mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-09-07 00:29:07 +01:00
yuzu: Only override fullscreen setting if gamepath or argument is provided
This commit is contained in:
parent
7382e7a5c8
commit
90c846d1ad
1 changed files with 10 additions and 3 deletions
|
@ -293,8 +293,6 @@ GMainWindow::GMainWindow()
|
||||||
|
|
||||||
MigrateConfigFiles();
|
MigrateConfigFiles();
|
||||||
|
|
||||||
ui->action_Fullscreen->setChecked(false);
|
|
||||||
|
|
||||||
#if defined(HAVE_SDL2) && !defined(_WIN32)
|
#if defined(HAVE_SDL2) && !defined(_WIN32)
|
||||||
SDL_InitSubSystem(SDL_INIT_VIDEO);
|
SDL_InitSubSystem(SDL_INIT_VIDEO);
|
||||||
// SDL disables the screen saver by default, and setting the hint
|
// SDL disables the screen saver by default, and setting the hint
|
||||||
|
@ -312,17 +310,20 @@ GMainWindow::GMainWindow()
|
||||||
}
|
}
|
||||||
|
|
||||||
QString game_path;
|
QString game_path;
|
||||||
|
bool has_gamepath = false;
|
||||||
|
bool is_fullscreen = false;
|
||||||
|
|
||||||
for (int i = 1; i < args.size(); ++i) {
|
for (int i = 1; i < args.size(); ++i) {
|
||||||
// Preserves drag/drop functionality
|
// Preserves drag/drop functionality
|
||||||
if (args.size() == 2 && !args[1].startsWith(QChar::fromLatin1('-'))) {
|
if (args.size() == 2 && !args[1].startsWith(QChar::fromLatin1('-'))) {
|
||||||
game_path = args[1];
|
game_path = args[1];
|
||||||
|
has_gamepath = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Launch game in fullscreen mode
|
// Launch game in fullscreen mode
|
||||||
if (args[i] == QStringLiteral("-f")) {
|
if (args[i] == QStringLiteral("-f")) {
|
||||||
ui->action_Fullscreen->setChecked(true);
|
is_fullscreen = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -365,9 +366,15 @@ GMainWindow::GMainWindow()
|
||||||
}
|
}
|
||||||
|
|
||||||
game_path = args[++i];
|
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()) {
|
if (!game_path.isEmpty()) {
|
||||||
BootGame(game_path);
|
BootGame(game_path);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue