AGS: rename "multitasking" option to "background" and added cmd arg

From upstream cb83231c03764c74b8f8f09f8c876207a475f7b9
This commit is contained in:
Thierry Crozat 2022-10-09 23:56:26 +01:00
parent 2f8d4cb072
commit 6bae4af005
2 changed files with 5 additions and 1 deletions

View File

@ -350,7 +350,7 @@ void apply_config(const ConfigTree &cfg) {
}
// Various system options
_GP(usetup).multitasking = CfgReadInt(cfg, "misc", "multitasking", 0) != 0;
_GP(usetup).multitasking = CfgReadInt(cfg, "misc", "background", 0) != 0;
// User's overrides and hacks
_GP(usetup).override_multitasking = CfgReadInt(cfg, "override", "multitasking", -1);

View File

@ -96,6 +96,8 @@ void main_print_help() {
"Usage: ags [OPTIONS] [GAMEFILE or DIRECTORY]\n\n"
//--------------------------------------------------------------------------------|
"Options:\n"
" --background Keeps game running in background\n"
" (this does not work in exclusive fullscreen)\n"
" --clear-cache-on-room-change Clears sprite cache on every room change\n"
" --conf FILEPATH Specify explicit config file to read on startup\n"
#if AGS_PLATFORM_OS_WINDOWS
@ -261,6 +263,8 @@ int main_process_cmdline(ConfigTree &cfg, int argc, const char *argv[]) {
cfg["language"]["translation"] = argv[++ee];
} else if (ags_stricmp(arg, "--no-translation") == 0) {
cfg["language"]["translation"] = "";
} else if (ags_stricmp(arg, "--background") == 0) {
cfg["override"]["multitasking"] = "1";
} else if (ags_stricmp(arg, "--fps") == 0)
cfg["misc"]["show_fps"] = "1";
else if (ags_stricmp(arg, "--test") == 0) _G(debug_flags) |= DBG_DEBUGMODE;