new ini option steam_game_stats_reports_dir to define a folder where statistics from ISteamGameStats will be saved

This commit is contained in:
a 2024-08-03 07:05:51 +03:00
parent 08f2bc36e0
commit a647c6cfdd
3 changed files with 22 additions and 0 deletions

View File

@ -295,6 +295,9 @@ public:
// synchronize user stats/achievements with game servers as soon as possible instead of caching them. // synchronize user stats/achievements with game servers as soon as possible instead of caching them.
bool immediate_gameserver_stats = false; bool immediate_gameserver_stats = false;
// steam_game_stats
std::string steam_game_stats_reports_dir{};
//overlay //overlay
bool disable_overlay = true; bool disable_overlay = true;
int overlay_hook_delay_sec = 0; // "Saints Row (2022)" needs a lot of time to initialize, otherwise detection will fail int overlay_hook_delay_sec = 0; // "Saints Row (2022)" needs a lot of time to initialize, otherwise detection will fail

View File

@ -1345,6 +1345,20 @@ static void parse_overlay_general_config(class Settings *settings_client, class
} }
// main::general::steam_game_stats_reports_dir
static void parse_steam_game_stats_reports_dir(class Settings *settings_client, class Settings *settings_server)
{
std::string line(common_helpers::string_strip(ini.GetValue("main::general", "steam_game_stats_reports_dir", "")));
if (line.size()) {
auto folder = common_helpers::to_absolute(line, get_full_program_path());
if (folder.size()) {
PRINT_DEBUG("ISteamGameStats reports will be saved to '%s'", folder.c_str());
settings_client->steam_game_stats_reports_dir = folder;
settings_server->steam_game_stats_reports_dir = folder;
}
}
}
// mainly enable/disable features // mainly enable/disable features
static void parse_simple_features(class Settings *settings_client, class Settings *settings_server) static void parse_simple_features(class Settings *settings_client, class Settings *settings_server)
{ {
@ -1697,6 +1711,7 @@ uint32 create_localstorage_settings(Settings **settings_client_out, Settings **s
parse_overlay_general_config(settings_client, settings_server); parse_overlay_general_config(settings_client, settings_server);
load_overlay_appearance(settings_client, settings_server, local_storage); load_overlay_appearance(settings_client, settings_server, local_storage);
parse_steam_game_stats_reports_dir(settings_client, settings_server);
*settings_client_out = settings_client; *settings_client_out = settings_client;
*settings_server_out = settings_server; *settings_server_out = settings_server;

View File

@ -57,6 +57,10 @@ matchmaking_server_details_via_source_query=0
# this is intended to debug some annoying scenarios, and best used with the debug build of the emu # this is intended to debug some annoying scenarios, and best used with the debug build of the emu
# default= # default=
crash_printer_location=./path/relative/to/dll/crashes.txt crash_printer_location=./path/relative/to/dll/crashes.txt
# some Source-based games use the interface ISteamGameStats to report some stats
# you can make the emu save this data to a folder
# empty value = don't save anything (default), otherwise the path specified must be writable
steam_game_stats_reports_dir=./path/relative/to/dll/
[main::connectivity] [main::connectivity]
# 1=prevent hooking OS networking APIs and allow any external requests # 1=prevent hooking OS networking APIs and allow any external requests