mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-24 20:31:04 +00:00
Resize: also trigger on rotation + clang format
This commit is contained in:
parent
cc850a2eae
commit
6f209424ca
@ -1678,7 +1678,7 @@ void GMainWindow::ToggleWindowMode() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void GMainWindow::ResizeScreen(const int scale) {
|
void GMainWindow::ResizeScreen(const int scale) {
|
||||||
if(!scale || !emulation_running) {
|
if (!scale || !emulation_running) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const auto size = Layout::GetMinimumSizeFromLayout(Settings::values.layout_option,
|
const auto size = Layout::GetMinimumSizeFromLayout(Settings::values.layout_option,
|
||||||
@ -1686,15 +1686,14 @@ void GMainWindow::ResizeScreen(const int scale) {
|
|||||||
|
|
||||||
auto_resized = true;
|
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->setMinimumSize(scale * size.first, scale * size.second);
|
||||||
render_window->updateGeometry();
|
render_window->updateGeometry();
|
||||||
ui->centralwidget->resize(scale * size.first, scale * size.second);
|
ui->centralwidget->resize(scale * size.first, scale * size.second);
|
||||||
ui->centralwidget->updateGeometry();
|
ui->centralwidget->updateGeometry();
|
||||||
updateGeometry();
|
updateGeometry();
|
||||||
resize(minimumSizeHint());
|
resize(minimumSizeHint());
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
render_window->resize(scale * size.first, scale * size.second);
|
render_window->resize(scale * size.first, scale * size.second);
|
||||||
}
|
}
|
||||||
render_window->UpdateCurrentFramebufferLayout(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() {
|
void GMainWindow::OnRotateScreens() {
|
||||||
Settings::values.upright_screen = ui->action_Screen_Layout_Upright_Screens->isChecked();
|
Settings::values.upright_screen = ui->action_Screen_Layout_Upright_Screens->isChecked();
|
||||||
Settings::Apply();
|
Settings::Apply();
|
||||||
|
ChangeScreenSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GMainWindow::OnCheats() {
|
void GMainWindow::OnCheats() {
|
||||||
|
Loading…
Reference in New Issue
Block a user