Qt: Simplify Host::CommitBaseSettingChanges()

This commit is contained in:
Stenzek 2024-12-15 13:00:08 +10:00
parent d00627b44b
commit 03e24637af
No known key found for this signature in database
1 changed files with 2 additions and 5 deletions

View File

@ -2023,9 +2023,6 @@ std::optional<std::time_t> Host::GetResourceFileTimestamp(std::string_view filen
void Host::CommitBaseSettingChanges() void Host::CommitBaseSettingChanges()
{ {
if (g_emu_thread->isCurrentThread())
QtHost::RunOnUIThread([]() { QtHost::QueueSettingsSave(); });
else
QtHost::QueueSettingsSave(); QtHost::QueueSettingsSave();
} }
@ -2164,7 +2161,7 @@ void QtHost::SaveSettings()
void QtHost::QueueSettingsSave() void QtHost::QueueSettingsSave()
{ {
if (g_emu_thread->isCurrentThread()) if (!QThread::isMainThread())
{ {
QtHost::RunOnUIThread(QueueSettingsSave); QtHost::RunOnUIThread(QueueSettingsSave);
return; return;