Core: Add System parameter to CPUThreadGuard.

This commit is contained in:
Admiral H. Curtiss 2023-03-08 01:58:05 +01:00
commit 912cd456fb
No known key found for this signature in database
GPG key ID: F051B4C4044F33FB
21 changed files with 86 additions and 74 deletions

View file

@ -37,6 +37,7 @@
#include "Core/ConfigManager.h"
#include "Core/Core.h"
#include "Core/PowerPC/PowerPC.h"
#include "Core/System.h"
#include "DolphinQt/Config/CheatCodeEditor.h"
#include "DolphinQt/Config/CheatWarningWidget.h"
@ -288,7 +289,7 @@ void CheatSearchWidget::OnNextScanClicked()
}
const Cheats::SearchErrorCode error_code = [this] {
Core::CPUThreadGuard guard;
Core::CPUThreadGuard guard(Core::System::GetInstance());
return m_session->RunSearch(guard);
}();
@ -397,7 +398,7 @@ bool CheatSearchWidget::RefreshValues()
tmp->SetFilterType(Cheats::FilterType::DoNotFilter);
const Cheats::SearchErrorCode error_code = [&tmp] {
Core::CPUThreadGuard guard;
Core::CPUThreadGuard guard(Core::System::GetInstance());
return tmp->RunSearch(guard);
}();