Qt/Settings: Emit EmulationStateChanged from the UI thread

This commit is contained in:
spycrab 2018-04-22 12:49:07 +02:00
parent 50e80d66db
commit 854fa0f093
1 changed files with 3 additions and 2 deletions

View File

@ -20,8 +20,9 @@
Settings::Settings()
{
qRegisterMetaType<Core::State>();
Core::SetOnStateChangedCallback(
[this](Core::State new_state) { emit EmulationStateChanged(new_state); });
Core::SetOnStateChangedCallback([this](Core::State new_state) {
QueueOnObject(this, [this, new_state] { emit EmulationStateChanged(new_state); });
});
Config::AddConfigChangedCallback(
[this] { QueueOnObject(this, [this] { emit ConfigChanged(); }); });