mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2024-11-27 05:04:01 +08:00
fix the condition of Steam_Apps::SetActiveBeta()
as noted by universal963
+ remove deprecated build_id from gen_emu_config
This commit is contained in:
parent
9443afbd00
commit
61d519bf0e
@ -549,10 +549,10 @@ bool Steam_Apps::SetActiveBeta( const char *pchBetaName )
|
||||
PRINT_DEBUG("'%s'", pchBetaName);
|
||||
std::lock_guard<std::recursive_mutex> lock(global_mutex);
|
||||
|
||||
// (sdk 1.60) apparently steam doesn't verify this condition, tested by 'universal963' on appid 480
|
||||
//if (!pchBetaName) return false;
|
||||
// (sdk 1.60) apparently steam always returns true if the string is null or empty, tested by 'universal963' on appid 480
|
||||
if (!pchBetaName || !pchBetaName[0]) return true;
|
||||
|
||||
std::string beta_name = pchBetaName ? pchBetaName : "";
|
||||
std::string beta_name = pchBetaName;
|
||||
auto branch_it = std::find_if(settings->branches.begin(), settings->branches.end(), [&beta_name](const Branch_Info &item){
|
||||
return common_helpers::str_cmp_insensitive(beta_name, item.name);
|
||||
});
|
||||
@ -568,7 +568,7 @@ bool Steam_Apps::SetActiveBeta( const char *pchBetaName )
|
||||
return true;
|
||||
}
|
||||
|
||||
return true; // (sdk 1.60) apparently steam doesn't even care and just returns true anyway, tested by 'universal963' on appid 480
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
@ -921,21 +921,6 @@ def main():
|
||||
for game_depot in all_depots:
|
||||
f.write(f"{game_depot}\n")
|
||||
|
||||
# try to read "build_id" from "public" branch
|
||||
# .FirstOrDefault("public")
|
||||
public_branch: dict = next(( branch for branch in all_branches if branch['name'].lower() == 'public' ), None)
|
||||
if public_branch is not None:
|
||||
buildid = str(public_branch['build_id'])
|
||||
if buildid != '0':
|
||||
merge_dict(out_config_app_ini, {
|
||||
'configs.app.ini': {
|
||||
'app::general': {
|
||||
'build_id': (buildid, 'allow the app/game to show the correct build id'),
|
||||
}
|
||||
}
|
||||
})
|
||||
# write the data as soon as possible in case a later step caused an exception
|
||||
write_ini_file(emu_settings_dir, out_config_app_ini)
|
||||
if all_branches:
|
||||
with open(os.path.join(emu_settings_dir, "branches.json"), "wt", encoding='utf-8') as f:
|
||||
json.dump(all_branches, f, ensure_ascii=False, indent=2)
|
||||
|
Loading…
Reference in New Issue
Block a user