summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-03-30 02:43:10 +0200
committerGitHub <noreply@github.com>2022-03-30 02:43:10 +0200
commit8e9d253687c2159dd9532e3a057fb312ce7b3c3b (patch)
tree07b818f7c104fb8912b66f91143ee3fae29f2484 /src
parentMerge pull request #8109 from lat9nq/god-why (diff)
parentyuzu: Only override fullscreen setting if gamepath or argument is provided (diff)
downloadyuzu-8e9d253687c2159dd9532e3a057fb312ce7b3c3b.tar
yuzu-8e9d253687c2159dd9532e3a057fb312ce7b3c3b.tar.gz
yuzu-8e9d253687c2159dd9532e3a057fb312ce7b3c3b.tar.bz2
yuzu-8e9d253687c2159dd9532e3a057fb312ce7b3c3b.tar.lz
yuzu-8e9d253687c2159dd9532e3a057fb312ce7b3c3b.tar.xz
yuzu-8e9d253687c2159dd9532e3a057fb312ce7b3c3b.tar.zst
yuzu-8e9d253687c2159dd9532e3a057fb312ce7b3c3b.zip
Diffstat (limited to 'src')
-rw-r--r--src/yuzu/main.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 3b7058a2b..62d15f8cd 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -293,8 +293,6 @@ GMainWindow::GMainWindow()
MigrateConfigFiles();
- ui->action_Fullscreen->setChecked(false);
-
#if defined(HAVE_SDL2) && !defined(_WIN32)
SDL_InitSubSystem(SDL_INIT_VIDEO);
// SDL disables the screen saver by default, and setting the hint
@@ -312,17 +310,20 @@ GMainWindow::GMainWindow()
}
QString game_path;
+ bool has_gamepath = false;
+ bool is_fullscreen = false;
for (int i = 1; i < args.size(); ++i) {
// Preserves drag/drop functionality
if (args.size() == 2 && !args[1].startsWith(QChar::fromLatin1('-'))) {
game_path = args[1];
+ has_gamepath = true;
break;
}
// Launch game in fullscreen mode
if (args[i] == QStringLiteral("-f")) {
- ui->action_Fullscreen->setChecked(true);
+ is_fullscreen = true;
continue;
}
@@ -365,9 +366,15 @@ GMainWindow::GMainWindow()
}
game_path = args[++i];
+ has_gamepath = true;
}
}
+ // Override fullscreen setting if gamepath or argument is provided
+ if (has_gamepath || is_fullscreen) {
+ ui->action_Fullscreen->setChecked(is_fullscreen);
+ }
+
if (!game_path.isEmpty()) {
BootGame(game_path);
}