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

@ -118,7 +118,7 @@ void Host_Message(HostMessageID id)
}
else if (id == HostMessageID::WMUserStop)
{
if (Core::IsRunning())
if (Core::IsRunning(Core::System::GetInstance()))
Core::QueueHostJob(&Core::Stop);
}
}
@ -272,7 +272,8 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetIsBooting
JNIEXPORT jboolean JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_IsRunning(JNIEnv*, jclass)
{
return s_is_booting.IsSet() || static_cast<jboolean>(Core::IsRunning());
return s_is_booting.IsSet() ||
static_cast<jboolean>(Core::IsRunning(Core::System::GetInstance()));
}
JNIEXPORT jboolean JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_IsRunningAndStarted(JNIEnv*,
@ -589,7 +590,7 @@ static void Run(JNIEnv* env, std::unique_ptr<BootParameters>&& boot, bool riivol
s_need_nonblocking_alert_msg = false;
surface_guard.unlock();
while (Core::IsRunning())
while (Core::IsRunning(Core::System::GetInstance()))
{
host_identity_guard.Unlock();
s_update_main_frame_event.Wait();