mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-22 10:51:50 -05:00
Merge citra-emu PR#3159 by FearlessTobi(citra-qt : Fix a bug in our fullscreen implementation)
This commit is contained in:
parent
f473780c52
commit
8cdc1be0df
2 changed files with 31 additions and 15 deletions
|
@ -420,7 +420,9 @@ void GMainWindow::BootGame(const QString& filename) {
|
||||||
render_window->setFocus();
|
render_window->setFocus();
|
||||||
|
|
||||||
emulation_running = true;
|
emulation_running = true;
|
||||||
ToggleFullscreen();
|
if (ui.action_Fullscreen->isChecked()) {
|
||||||
|
ShowFullscreen();
|
||||||
|
}
|
||||||
OnStartGame();
|
OnStartGame();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -572,21 +574,33 @@ void GMainWindow::ToggleFullscreen() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ui.action_Fullscreen->isChecked()) {
|
if (ui.action_Fullscreen->isChecked()) {
|
||||||
if (ui.action_Single_Window_Mode->isChecked()) {
|
ShowFullscreen();
|
||||||
ui.menubar->hide();
|
|
||||||
statusBar()->hide();
|
|
||||||
showFullScreen();
|
|
||||||
} else {
|
|
||||||
render_window->showFullScreen();
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if (ui.action_Single_Window_Mode->isChecked()) {
|
HideFullscreen();
|
||||||
statusBar()->setVisible(ui.action_Show_Status_Bar->isChecked());
|
}
|
||||||
ui.menubar->show();
|
}
|
||||||
showNormal();
|
|
||||||
} else {
|
void GMainWindow::ShowFullscreen() {
|
||||||
render_window->showNormal();
|
if (ui.action_Single_Window_Mode->isChecked()) {
|
||||||
}
|
UISettings::values.geometry = saveGeometry();
|
||||||
|
ui.menubar->hide();
|
||||||
|
statusBar()->hide();
|
||||||
|
showFullScreen();
|
||||||
|
} else {
|
||||||
|
UISettings::values.renderwindow_geometry = render_window->saveGeometry();
|
||||||
|
render_window->showFullScreen();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void GMainWindow::HideFullscreen() {
|
||||||
|
if (ui.action_Single_Window_Mode->isChecked()) {
|
||||||
|
statusBar()->setVisible(ui.action_Show_Status_Bar->isChecked());
|
||||||
|
ui.menubar->show();
|
||||||
|
showNormal();
|
||||||
|
restoreGeometry(UISettings::values.geometry);
|
||||||
|
} else {
|
||||||
|
render_window->showNormal();
|
||||||
|
render_window->restoreGeometry(UISettings::values.renderwindow_geometry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -128,6 +128,8 @@ private slots:
|
||||||
void OnToggleFilterBar();
|
void OnToggleFilterBar();
|
||||||
void OnDisplayTitleBars(bool);
|
void OnDisplayTitleBars(bool);
|
||||||
void ToggleFullscreen();
|
void ToggleFullscreen();
|
||||||
|
void ShowFullscreen();
|
||||||
|
void HideFullscreen();
|
||||||
void ToggleWindowMode();
|
void ToggleWindowMode();
|
||||||
void OnCoreError(Core::System::ResultStatus, std::string);
|
void OnCoreError(Core::System::ResultStatus, std::string);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue