From 6f209424ca37bafa668b56d73d8ce46c0df6a4b8 Mon Sep 17 00:00:00 2001 From: Vitor Kiguchi Date: Fri, 11 Dec 2020 19:21:52 -0300 Subject: [PATCH] Resize: also trigger on rotation + clang format --- src/citra_qt/main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index f89533ff7..6cc33a432 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp @@ -1678,7 +1678,7 @@ void GMainWindow::ToggleWindowMode() { } void GMainWindow::ResizeScreen(const int scale) { - if(!scale || !emulation_running) { + if (!scale || !emulation_running) { return; } const auto size = Layout::GetMinimumSizeFromLayout(Settings::values.layout_option, @@ -1686,15 +1686,14 @@ void GMainWindow::ResizeScreen(const int scale) { auto_resized = true; - if(ui->action_Single_Window_Mode->isChecked()) { + if (ui->action_Single_Window_Mode->isChecked()) { render_window->setMinimumSize(scale * size.first, scale * size.second); render_window->updateGeometry(); ui->centralwidget->resize(scale * size.first, scale * size.second); ui->centralwidget->updateGeometry(); updateGeometry(); resize(minimumSizeHint()); - } - else { + } else { render_window->resize(scale * size.first, scale * size.second); } render_window->UpdateCurrentFramebufferLayout(scale * size.first, scale * size.second); @@ -1770,6 +1769,7 @@ void GMainWindow::OnSwapScreens() { void GMainWindow::OnRotateScreens() { Settings::values.upright_screen = ui->action_Screen_Layout_Upright_Screens->isChecked(); Settings::Apply(); + ChangeScreenSize(); } void GMainWindow::OnCheats() {