Core: SetOnStoppedCallback -> SetOnStateChangedCallback

This commit is contained in:
Michael M
2017-09-04 10:57:42 -07:00
parent 22a9a08b24
commit 8e805dcbf4
5 changed files with 25 additions and 11 deletions

View File

@ -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