summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Kyle Kienapfel2022-05-31 18:32:04 -0700
committerGravatar Kyle Kienapfel2022-05-31 21:24:31 -0700
commit36df3ce97e75337128369e542e16155ca7fe5c34 (patch)
tree5a67a128b0809ef3e79f773007a01222f8d8546a /src
parentMerge pull request #8385 from lat9nq/just-subsys-win (diff)
downloadyuzu-36df3ce97e75337128369e542e16155ca7fe5c34.tar.gz
yuzu-36df3ce97e75337128369e542e16155ca7fe5c34.tar.xz
yuzu-36df3ce97e75337128369e542e16155ca7fe5c34.zip
fix UI opening fullscreen after certain crashes
Sometimes when yuzu crashes, it restarts with the games list in fullscreen, which would be fine, except there isn't an easy way to exit this. It also doesn't occur often enough for qt-config.ini files to be in good supply. UILayout\geometry value in qt-config.ini is the culprit, at least for the one provided. Proposed fix is to simply check isFullScreen when yuzu is starting up, and take it out of full screen immediately
Diffstat (limited to '')
-rw-r--r--src/yuzu/main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index f4a9a7171..5162ae285 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -1015,6 +1015,10 @@ void GMainWindow::SetDefaultUIGeometry() {
1015void GMainWindow::RestoreUIState() { 1015void GMainWindow::RestoreUIState() {
1016 setWindowFlags(windowFlags() & ~Qt::FramelessWindowHint); 1016 setWindowFlags(windowFlags() & ~Qt::FramelessWindowHint);
1017 restoreGeometry(UISettings::values.geometry); 1017 restoreGeometry(UISettings::values.geometry);
1018 // Work-around because the games list isn't supposed to be full screen
1019 if (isFullScreen()) {
1020 showNormal();
1021 }
1018 restoreState(UISettings::values.state); 1022 restoreState(UISettings::values.state);
1019 render_window->setWindowFlags(render_window->windowFlags() & ~Qt::FramelessWindowHint); 1023 render_window->setWindowFlags(render_window->windowFlags() & ~Qt::FramelessWindowHint);
1020 render_window->restoreGeometry(UISettings::values.renderwindow_geometry); 1024 render_window->restoreGeometry(UISettings::values.renderwindow_geometry);