From bada677c5aed99677094f46548dfccd86f009f07 Mon Sep 17 00:00:00 2001 From: Christian Aguilera Date: Sun, 16 Aug 2020 01:42:08 +0100 Subject: [PATCH] Avoid using unnecessary RunOnObject() calls in GameTracker's worker thread to prevent deadlocks on shutdown. --- Source/Core/DolphinQt/GameList/GameTracker.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/Core/DolphinQt/GameList/GameTracker.cpp b/Source/Core/DolphinQt/GameList/GameTracker.cpp index 12f176afbb..4d8a5d25d7 100644 --- a/Source/Core/DolphinQt/GameList/GameTracker.cpp +++ b/Source/Core/DolphinQt/GameList/GameTracker.cpp @@ -16,7 +16,6 @@ #include "DiscIO/DirectoryBlob.h" #include "DolphinQt/QtUtils/QueueOnObject.h" -#include "DolphinQt/QtUtils/RunOnObject.h" #include "DolphinQt/Settings.h" @@ -162,7 +161,7 @@ void GameTracker::StartInternal() bool GameTracker::AddPath(const QString& dir) { if (Settings::Instance().IsAutoRefreshEnabled()) - RunOnObject(this, [this, dir] { return addPath(dir); }); + QueueOnObject(this, [this, dir] { return addPath(dir); }); m_tracked_paths.push_back(dir); @@ -172,7 +171,7 @@ bool GameTracker::AddPath(const QString& dir) bool GameTracker::RemovePath(const QString& dir) { if (Settings::Instance().IsAutoRefreshEnabled()) - RunOnObject(this, [this, dir] { return removePath(dir); }); + QueueOnObject(this, [this, dir] { return removePath(dir); }); const auto index = m_tracked_paths.indexOf(dir);