summaryrefslogtreecommitdiffstats
path: root/src/citra_qt/main.cpp
diff options
context:
space:
mode:
authorarchshift <gh@archshift.com>2015-09-01 03:30:06 +0200
committerarchshift <gh@archshift.com>2015-10-02 04:39:14 +0200
commitafd06675fa2b93c81f0f868443c03cc3ad8bee07 (patch)
treee13374b6307d1d0e908b26222c1fc6d4c9ac67d2 /src/citra_qt/main.cpp
parentSplit up FileUtil::ScanDirectoryTree to be able to use callbacks for custom behavior (diff)
downloadyuzu-afd06675fa2b93c81f0f868443c03cc3ad8bee07.tar
yuzu-afd06675fa2b93c81f0f868443c03cc3ad8bee07.tar.gz
yuzu-afd06675fa2b93c81f0f868443c03cc3ad8bee07.tar.bz2
yuzu-afd06675fa2b93c81f0f868443c03cc3ad8bee07.tar.lz
yuzu-afd06675fa2b93c81f0f868443c03cc3ad8bee07.tar.xz
yuzu-afd06675fa2b93c81f0f868443c03cc3ad8bee07.tar.zst
yuzu-afd06675fa2b93c81f0f868443c03cc3ad8bee07.zip
Diffstat (limited to 'src/citra_qt/main.cpp')
-rw-r--r--src/citra_qt/main.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp
index 01841b33c..58de28c1d 100644
--- a/src/citra_qt/main.cpp
+++ b/src/citra_qt/main.cpp
@@ -266,6 +266,7 @@ void GMainWindow::BootGame(const std::string& filename) {
callstackWidget->OnDebugModeEntered();
render_window->show();
+ emulation_running = true;
OnStartGame();
}
@@ -294,6 +295,8 @@ void GMainWindow::ShutdownGame() {
ui.action_Pause->setEnabled(false);
ui.action_Stop->setEnabled(false);
render_window->hide();
+
+ emulation_running = false;
}
void GMainWindow::StoreRecentFile(const QString& filename)
@@ -423,17 +426,21 @@ void GMainWindow::ToggleWindowMode() {
// Render in the main window...
render_window->BackupGeometry();
ui.horizontalLayout->addWidget(render_window);
- render_window->setVisible(true);
render_window->setFocusPolicy(Qt::ClickFocus);
- render_window->setFocus();
+ if (emulation_running) {
+ render_window->setVisible(true);
+ render_window->setFocus();
+ }
} else {
// Render in a separate window...
ui.horizontalLayout->removeWidget(render_window);
render_window->setParent(nullptr);
- render_window->setVisible(true);
- render_window->RestoreGeometry();
render_window->setFocusPolicy(Qt::NoFocus);
+ if (emulation_running) {
+ render_window->setVisible(true);
+ render_window->RestoreGeometry();
+ }
}
}