workaround to make Steam Input work, not guaranteed

This commit is contained in:
otavepto 2024-04-20 01:13:10 +02:00
parent f0c42efcbf
commit 893f566375
4 changed files with 16 additions and 4 deletions

View File

@ -224,6 +224,9 @@ public:
bool disable_account_avatar = false; bool disable_account_avatar = false;
// setting this env var conflicts with Steam Input
bool disable_steamoverlaygameid_env_var = false;
std::map<int, struct Image_Data> images{}; std::map<int, struct Image_Data> images{};
//subscribed lobby/group ids //subscribed lobby/group ids

View File

@ -83,7 +83,10 @@ Steam_Client::Steam_Client()
auto appid_str = std::to_string(appid); auto appid_str = std::to_string(appid);
set_env_variable("SteamAppId", appid_str); set_env_variable("SteamAppId", appid_str);
set_env_variable("SteamGameId", appid_str); set_env_variable("SteamGameId", appid_str);
set_env_variable("SteamOverlayGameId", appid_str);
if (!settings_client->disable_steamoverlaygameid_env_var) {
set_env_variable("SteamOverlayGameId", appid_str);
}
} }
{ {
@ -170,6 +173,8 @@ Steam_Client::Steam_Client()
last_cb_run = 0; last_cb_run = 0;
PRINT_DEBUG("end *********"); PRINT_DEBUG("end *********");
reset_LastError();
} }
Steam_Client::~Steam_Client() Steam_Client::~Steam_Client()
@ -272,7 +277,10 @@ void Steam_Client::setAppID(uint32 appid)
network->setAppID(appid); network->setAppID(appid);
set_env_variable("SteamAppId", std::to_string(appid)); set_env_variable("SteamAppId", std::to_string(appid));
set_env_variable("SteamGameId", std::to_string(appid)); set_env_variable("SteamGameId", std::to_string(appid));
set_env_variable("SteamOverlayGameId", std::to_string(appid));
if (!settings_client->disable_steamoverlaygameid_env_var) {
set_env_variable("SteamOverlayGameId", std::to_string(appid));
}
} }

View File

@ -214,7 +214,7 @@ if [ ! -z "${STEAM_RUNTIME}" ]; then
) )
fi fi
GseAppPath="${EXE_RUN_DIR}" SteamAppId=$APP_ID SteamGameId=$APP_ID SteamOverlayGameId=$APP_ID SteamAppUser='client_player' SteamUser='client_player' SteamClientLaunch='1' SteamEnv='1' SteamPath="$script_dir" "$TARGET_EXE" "${EXE_COMMAND_LINE[@]}" GseAppPath="${EXE_RUN_DIR}" SteamAppId=$APP_ID SteamGameId=$APP_ID SteamAppUser='client_player' SteamUser='client_player' SteamClientLaunch='1' SteamEnv='1' SteamPath="$script_dir" "$TARGET_EXE" "${EXE_COMMAND_LINE[@]}"
popd popd

View File

@ -322,7 +322,8 @@ void set_steam_env_vars(const std::wstring &AppId)
{ {
SetEnvironmentVariableW(L"SteamAppId", AppId.c_str()); SetEnvironmentVariableW(L"SteamAppId", AppId.c_str());
SetEnvironmentVariableW(L"SteamGameId", AppId.c_str()); SetEnvironmentVariableW(L"SteamGameId", AppId.c_str());
SetEnvironmentVariableW(L"SteamOverlayGameId", AppId.c_str()); // this env var conflicts with Steam Input
// SetEnvironmentVariableW(L"SteamOverlayGameId", AppId.c_str());
// these 2 wil be overridden by the emu // these 2 wil be overridden by the emu
SetEnvironmentVariableW(L"SteamAppUser", L"cold_player"); SetEnvironmentVariableW(L"SteamAppUser", L"cold_player");