mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2025-01-12 02:19:31 +08:00
add missing env var "SteamOverlayGameId" to steam_client and client_loader
This commit is contained in:
parent
f83d930e7b
commit
f397f73644
@ -304,9 +304,12 @@ uint32 create_localstorage_settings(Settings **settings_client_out, Settings **s
|
||||
if (!appid) {
|
||||
std::string str_appid = get_env_variable("SteamAppId");
|
||||
std::string str_gameid = get_env_variable("SteamGameId");
|
||||
PRINT_DEBUG("str_appid %s str_gameid: %s\n", str_appid.c_str(), str_gameid.c_str());
|
||||
std::string str_overlay_gameid = get_env_variable("SteamOverlayGameId");
|
||||
|
||||
PRINT_DEBUG("str_appid %s str_gameid: %s str_overlay_gameid: %s\n", str_appid.c_str(), str_gameid.c_str(), str_overlay_gameid.c_str());
|
||||
uint32 appid_env = 0;
|
||||
uint32 gameid_env = 0;
|
||||
uint32 overlay_gameid = 0;
|
||||
|
||||
if (str_appid.size() > 0) {
|
||||
try {
|
||||
@ -324,7 +327,15 @@ uint32 create_localstorage_settings(Settings **settings_client_out, Settings **s
|
||||
}
|
||||
}
|
||||
|
||||
PRINT_DEBUG("appid_env %u gameid_env: %u\n", appid_env, gameid_env);
|
||||
if (str_overlay_gameid.size() > 0) {
|
||||
try {
|
||||
overlay_gameid = std::stoul(str_overlay_gameid);
|
||||
} catch (...) {
|
||||
overlay_gameid = 0;
|
||||
}
|
||||
}
|
||||
|
||||
PRINT_DEBUG("appid_env %u gameid_env: %u overlay_gameid: %u\n", appid_env, gameid_env, overlay_gameid);
|
||||
if (appid_env) {
|
||||
appid = appid_env;
|
||||
}
|
||||
@ -332,6 +343,10 @@ uint32 create_localstorage_settings(Settings **settings_client_out, Settings **s
|
||||
if (gameid_env) {
|
||||
appid = gameid_env;
|
||||
}
|
||||
|
||||
if (overlay_gameid) {
|
||||
appid = overlay_gameid;
|
||||
}
|
||||
}
|
||||
|
||||
bool local_save = false;
|
||||
|
@ -65,6 +65,7 @@ Steam_Client::Steam_Client()
|
||||
if (appid) {
|
||||
set_env_variable("SteamAppId", std::to_string(appid));
|
||||
set_env_variable("SteamGameId", std::to_string(appid));
|
||||
set_env_variable("SteamOverlayGameId", std::to_string(appid));
|
||||
}
|
||||
|
||||
steam_overlay = new Steam_Overlay(settings_client, callback_results_client, callbacks_client, run_every_runcb, network);
|
||||
@ -220,6 +221,7 @@ void Steam_Client::setAppID(uint32 appid)
|
||||
network->setAppID(appid);
|
||||
set_env_variable("SteamAppId", std::to_string(appid));
|
||||
set_env_variable("SteamGameId", std::to_string(appid));
|
||||
set_env_variable("SteamOverlayGameId", std::to_string(appid));
|
||||
}
|
||||
|
||||
|
||||
|
@ -58,6 +58,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance
|
||||
if (AppId[0]) {
|
||||
SetEnvironmentVariableW(L"SteamAppId", AppId);
|
||||
SetEnvironmentVariableW(L"SteamGameId", AppId);
|
||||
SetEnvironmentVariableW(L"SteamOverlayGameId", AppId);
|
||||
} else {
|
||||
MessageBoxA(NULL, "You forgot to set the AppId.", "ColdClientLoader", MB_ICONERROR);
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user