Skip to content

Commit

Permalink
Fix command line parsing of 'direct-menu'
Browse files Browse the repository at this point in the history
  • Loading branch information
florianessl committed Feb 28, 2024
1 parent ff760cf commit 5513779
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/game_config_game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,11 @@ void Game_ConfigGame::LoadFromArgs(CmdlineParser& cp) {
patch_key_patch.Set(true);
} else if (v == "rpg2k3-cmds" || v == "rpg2k3-commands") {
patch_rpg2k3_commands.Set(true);
} else if (v == "direct-menu") {
patch_direct_menu.Set(true);
} else if (v.rfind("direct-menu=") == 0) {
int num = static_cast<int>(std::strtol(v.substr(12).c_str(), nullptr, 0));
if (num > 0) {
patch_direct_menu.Set(num);
}
}
}
patch_override = true;
Expand Down
3 changes: 2 additions & 1 deletion src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1403,7 +1403,8 @@ Engine options:
pic-unlock - Pictures are not blocked by messages
rpg2k3-cmds - Support all RPG Maker 2003 event commands
in any version of the engine
direct-menu - Directly access subscreens of default menu
direct-menu=[var-id]
- Directly access subscreens of default menu
--no-patch Disable all engine patches.
--project-path PATH Instead of using the working directory, the game in PATH
is used.
Expand Down

0 comments on commit 5513779

Please sign in to comment.