diff --git a/src/lime_qt/main.cpp b/src/lime_qt/main.cpp index 82fb553e1..eb5fcd302 100644 --- a/src/lime_qt/main.cpp +++ b/src/lime_qt/main.cpp @@ -302,24 +302,19 @@ GMainWindow::GMainWindow(Core::System& system_) 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]; + } + // Launch game in windowed mode if (args[i] == QStringLiteral("-w")) { ui->action_Fullscreen->setChecked(false); continue; } - - // Launch game at path - if (args[i] == QStringLiteral("-g")) { - if (i >= args.size() - 1) { - continue; - } - - if (args[i + 1].startsWith(QChar::fromLatin1('-'))) { - continue; - } - - game_path = args[++i]; - } } if (!game_path.isEmpty()) {