lime_qt: Removed old -g option; Software path is now passed as the last parameter instead

This commit is contained in:
OpenSauce04 2024-10-05 19:42:34 +01:00 committed by OpenSauce
parent 60a7697982
commit 6febd56518

View file

@ -317,15 +317,6 @@ GMainWindow::GMainWindow(Core::System& system_)
continue; continue;
} }
// Launch game at path
if (args[i] == QStringLiteral("-g")) {
if (i >= args.size() - 1 || args[i + 1].startsWith(QChar::fromLatin1('-'))) {
continue;
}
game_path = args[++i];
continue;
}
if (args[i] == QStringLiteral("-p")) { if (args[i] == QStringLiteral("-p")) {
if (i >= args.size() - 1 || args[i + 1].startsWith(QChar::fromLatin1('-'))) { if (i >= args.size() - 1 || args[i + 1].startsWith(QChar::fromLatin1('-'))) {
continue; continue;
@ -349,6 +340,11 @@ GMainWindow::GMainWindow(Core::System& system_)
ui->action_Fullscreen->setChecked(false); ui->action_Fullscreen->setChecked(false);
continue; continue;
} }
// Launch game at path
if (i == args.size() - 1 && !args[i + 1].startsWith(QChar::fromLatin1('-'))) {
game_path = args[++i];
}
} }
if (!game_path.isEmpty()) { if (!game_path.isEmpty()) {
@ -3647,10 +3643,9 @@ static Qt::HighDpiScaleFactorRoundingPolicy GetHighDpiRoundingPolicy() {
static void PrintHelp(const char* argv0) { static void PrintHelp(const char* argv0) {
std::cout << "Usage: " << argv0 std::cout << "Usage: " << argv0
<< " [options] <filename>\n" << " [options] <file path>\n"
"-d [path] Dump video recording of emulator playback to the given file path\n" "-d [path] Dump video recording of emulator playback to the given file path\n"
"-f Start in fullscreen mode\n" "-f Start in fullscreen mode\n"
"-g [path] Start a game file located at the given path\n"
"-h Display this help and exit\n" "-h Display this help and exit\n"
"-i [path] Install a CIA file at the given path\n" "-i [path] Install a CIA file at the given path\n"
"-p [path] Play a TAS movie located at the given path\n" "-p [path] Play a TAS movie located at the given path\n"