From 03e24637af0ce2f1631a9c68d74e350a001dd228 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 15 Dec 2024 13:00:08 +1000 Subject: [PATCH] Qt: Simplify Host::CommitBaseSettingChanges() --- src/duckstation-qt/qthost.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/duckstation-qt/qthost.cpp b/src/duckstation-qt/qthost.cpp index 8004039b1..7e2814f7d 100644 --- a/src/duckstation-qt/qthost.cpp +++ b/src/duckstation-qt/qthost.cpp @@ -2023,10 +2023,7 @@ std::optional Host::GetResourceFileTimestamp(std::string_view filen void Host::CommitBaseSettingChanges() { - if (g_emu_thread->isCurrentThread()) - QtHost::RunOnUIThread([]() { QtHost::QueueSettingsSave(); }); - else - QtHost::QueueSettingsSave(); + QtHost::QueueSettingsSave(); } std::optional Host::AcquireRenderWindow(RenderAPI render_api, bool fullscreen, bool exclusive_fullscreen, @@ -2164,7 +2161,7 @@ void QtHost::SaveSettings() void QtHost::QueueSettingsSave() { - if (g_emu_thread->isCurrentThread()) + if (!QThread::isMainThread()) { QtHost::RunOnUIThread(QueueSettingsSave); return;