Core::IsRunning: Avoid Global System Accessor

This commit is contained in:
mitaclaw
2024-04-08 20:33:55 -07:00
parent b71fdef356
commit 0df401b164
25 changed files with 90 additions and 74 deletions

View File

@ -43,6 +43,7 @@
#include "Core/IOS/FS/FileSystem.h"
#include "Core/NetPlayServer.h"
#include "Core/SyncIdentifier.h"
#include "Core/System.h"
#include "DolphinQt/NetPlay/ChunkedProgressDialog.h"
#include "DolphinQt/NetPlay/GameDigestDialog.h"
@ -578,7 +579,7 @@ void NetPlayDialog::UpdateDiscordPresence()
m_current_game_name);
};
if (Core::IsRunning())
if (Core::IsRunning(Core::System::GetInstance()))
return use_default();
if (IsHosting())
@ -802,7 +803,7 @@ void NetPlayDialog::DisplayMessage(const QString& msg, const std::string& color,
QColor c(color.empty() ? QStringLiteral("white") : QString::fromStdString(color));
if (g_ActiveConfig.bShowNetPlayMessages && Core::IsRunning())
if (g_ActiveConfig.bShowNetPlayMessages && Core::IsRunning(Core::System::GetInstance()))
g_netplay_chat_ui->AppendChat(msg.toStdString(),
{static_cast<float>(c.redF()), static_cast<float>(c.greenF()),
static_cast<float>(c.blueF())});
@ -902,7 +903,7 @@ void NetPlayDialog::OnMsgStopGame()
void NetPlayDialog::OnMsgPowerButton()
{
if (!Core::IsRunning())
if (!Core::IsRunning(Core::System::GetInstance()))
return;
QueueOnObject(this, [] { UICommon::TriggerSTMPowerEvent(); });
}