Skip to content

VERY experimental Nintendo Switch 2 emulator

C++

[qt] allow launch like: eden -f <game path>, instead of eden -f -g <game path> (#3420)

lizzie81367e6e33ed
diff --git a/src/yuzu/main_window.cpp b/src/yuzu/main_window.cpp
index 85980b5396..cffd9f4444 100644
--- a/src/yuzu/main_window.cpp
+++ b/src/yuzu/main_window.cpp
@@ -620,10 +620,7 @@ MainWindow::MainWindow(bool has_broken_vulkan)
bool is_fullscreen = false;
// Preserves drag/drop functionality
- if (args.size() == 2 && !args[1].startsWith(QChar::fromLatin1('-'))) {
- game_path = args[1];
- has_gamepath = true;
- } else for (int i = 1; i < args.size(); ++i) {
+ for (int i = 1; i < args.size(); ++i) {
if (args[i] == QStringLiteral("-f")) {
// Launch game in fullscreen mode
is_fullscreen = true;
@@ -653,10 +650,14 @@ MainWindow::MainWindow(bool has_broken_vulkan)
// Launch game at path
game_path = args[++i];
has_gamepath = true;
- } else if (args[i] == QStringLiteral("-qlaunch"))
+ } else if (args[i] == QStringLiteral("-qlaunch")) {
should_launch_qlaunch = true;
- else if (args[i] == QStringLiteral("-setup"))
+ } else if (args[i] == QStringLiteral("-setup")) {
should_launch_setup = true;
+ } else {
+ game_path = args[i];
+ has_gamepath = true;
+ }
}
// Override fullscreen setting if gamepath or argument is provided