summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinNoGUI/MainNoGUI.cpp
diff options
context:
space:
mode:
authorLeo Lam <leolino.lam@gmail.com>2017-09-15 18:45:17 +0200
committerGitHub <noreply@github.com>2017-09-15 18:45:17 +0200
commit0d078219358b04266206ea1e2622396db7724136 (patch)
treeefafafd00041afae7f3d390e19a0a4a5d650f9fe /Source/Core/DolphinNoGUI/MainNoGUI.cpp
parent30dd544931575f5136bc4a5cc972d0f3c55979c5 (diff)
parent3e1072b24dd8f60fd13b9aca3527066d478f9774 (diff)
Merge pull request #6024 from ligfx/coreonstatechangedcallback
Qt: use Settings::EmulationStateChanged
Diffstat (limited to 'Source/Core/DolphinNoGUI/MainNoGUI.cpp')
-rw-r--r--Source/Core/DolphinNoGUI/MainNoGUI.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/Core/DolphinNoGUI/MainNoGUI.cpp b/Source/Core/DolphinNoGUI/MainNoGUI.cpp
index 37860057aa..ecd2d3ba88 100644
--- a/Source/Core/DolphinNoGUI/MainNoGUI.cpp
+++ b/Source/Core/DolphinNoGUI/MainNoGUI.cpp
@@ -392,7 +392,10 @@ int main(int argc, char* argv[])
UICommon::SetUserDirectory(user_directory);
UICommon::Init();
- Core::SetOnStoppedCallback([]() { s_running.Clear(); });
+ Core::SetOnStateChangedCallback([](Core::State state) {
+ if (state == Core::State::Uninitialized)
+ s_running.Clear();
+ });
platform->Init();
// Shut down cleanly on SIGINT and SIGTERM