diff options
| author | Leo Lam <leolino.lam@gmail.com> | 2017-06-20 21:14:13 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-06-20 21:14:13 +0200 |
| commit | 3fe8e102fc7b7ef82bd9e2d4b0e82fd0cdfca8ea (patch) | |
| tree | 14ab6907af9e9f9f3b880146188f3c11a4c8d4d8 | |
| parent | b584d2797f833c768cb73341133778704e476122 (diff) | |
| parent | fb135c99e36739b24b72d5a841909d156172b3e9 (diff) | |
Merge pull request #5648 from leoetlino/qt-shutdown
Qt: Fix emulation stopped signal
| -rw-r--r-- | Source/Core/DolphinQt2/MainWindow.cpp | 7 | ||||
| -rw-r--r-- | Source/Core/DolphinQt2/MainWindow.h | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/Source/Core/DolphinQt2/MainWindow.cpp b/Source/Core/DolphinQt2/MainWindow.cpp index c678d61bdf..7b6919d56c 100644 --- a/Source/Core/DolphinQt2/MainWindow.cpp +++ b/Source/Core/DolphinQt2/MainWindow.cpp @@ -52,6 +52,7 @@ MainWindow::MainWindow() : QMainWindow(nullptr) ConnectMenuBar(); InitControllers(); + InitCoreCallbacks(); } MainWindow::~MainWindow() @@ -88,6 +89,11 @@ void MainWindow::ShutdownControllers() m_hotkey_scheduler->deleteLater(); } +void MainWindow::InitCoreCallbacks() +{ + Core::SetOnStoppedCallback([this] { emit EmulationStopped(); }); +} + static void InstallHotkeyFilter(QWidget* dialog) { auto* filter = new WindowActivationEventFilter(); @@ -291,7 +297,6 @@ void MainWindow::ForceStop() { BootManager::Stop(); HideRenderWidget(); - emit EmulationStopped(); } void MainWindow::Reset() diff --git a/Source/Core/DolphinQt2/MainWindow.h b/Source/Core/DolphinQt2/MainWindow.h index 2b9b2c4e90..7577be2be7 100644 --- a/Source/Core/DolphinQt2/MainWindow.h +++ b/Source/Core/DolphinQt2/MainWindow.h @@ -69,6 +69,8 @@ private: void InitControllers(); void ShutdownControllers(); + void InitCoreCallbacks(); + void StartGame(const QString& path); void ShowRenderWidget(); void HideRenderWidget(); |
