diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index 6cc33a432..9afd88da6 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp @@ -1677,7 +1677,8 @@ void GMainWindow::ToggleWindowMode() { } } -void GMainWindow::ResizeScreen(const int scale) { +void GMainWindow::ResizeScreen() { + const int scale = UISettings::values.fixed_screen_size; if (!scale || !emulation_running) { return; } @@ -1714,9 +1715,19 @@ void GMainWindow::ChangeScreenSize() { new_scale = 4; } + const bool needs_workaround = UISettings::values.fixed_screen_size == 1 && new_scale == 1; UISettings::values.fixed_screen_size = new_scale; - ResizeScreen(new_scale); + ResizeScreen(); + + if (needs_workaround) { + // Workaround for a bug when the layout is switched to one + // with a smaller minimum size, which would make the window + // not resize properly, when in 1x. + // TODO (vitor-k): repro and report to Qt and/or find a + // better workaround + QTimer::singleShot(100, this, &GMainWindow::ResizeScreen); + } } void GMainWindow::ChangeScreenLayout() { diff --git a/src/citra_qt/main.h b/src/citra_qt/main.h index 9e6f9f648..399a91ea1 100644 --- a/src/citra_qt/main.h +++ b/src/citra_qt/main.h @@ -120,7 +120,7 @@ private: void ConnectWidgetEvents(); void ConnectMenuEvents(); - void ResizeScreen(int scale); + void ResizeScreen(); void UncheckWindowSize(); void PreventOSSleep();