Skip to content

Commit

Permalink
Do not show game selection window when --help is used
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkwouter committed Aug 27, 2024
1 parent c0c4333 commit f7395f1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions SurrealEngine/GameFolder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ GameLaunchInfo GameFolderSelection::GetLaunchInfo()
}

GameLaunchInfo info;
if (!foundGames.empty()) {
info.showHelp = commandline->HasArg("-h", "--help");
if (!info.showHelp && !foundGames.empty()) {
int selectedGame = LauncherWindow::ExecModal(foundGames);
if (selectedGame < 0)
return {};
Expand All @@ -53,7 +54,7 @@ GameLaunchInfo GameFolderSelection::GetLaunchInfo()
info.gameName = commandline->GetArg("-g", "--game", info.gameName);
info.noEntryMap = commandline->HasArg("-n", "--noentrymap") || info.noEntryMap;
info.url = commandline->GetArg("-u", "--url", info.url);
info.showHelp = commandline->HasArg("-h", "--help");


return info;
}
Expand Down

0 comments on commit f7395f1

Please sign in to comment.