Skip to content

Commit

Permalink
Avoid using unnecessary RunOnObject() calls in GameTracker's worker t…
Browse files Browse the repository at this point in the history
…hread to prevent deadlocks on shutdown.
  • Loading branch information
cristian64 committed Sep 19, 2020
1 parent 2a7e1d9 commit fcd97f6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Source/Core/DolphinQt/GameList/GameTracker.cpp
Expand Up @@ -16,7 +16,6 @@
#include "DiscIO/DirectoryBlob.h"

#include "DolphinQt/QtUtils/QueueOnObject.h"
#include "DolphinQt/QtUtils/RunOnObject.h"

#include "DolphinQt/Settings.h"

Expand Down Expand Up @@ -169,7 +168,7 @@ void GameTracker::Cancel()
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);

Expand All @@ -179,7 +178,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);

Expand Down

0 comments on commit fcd97f6

Please sign in to comment.