mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Core::GetState: Avoid Global System Accessor
This commit is contained in:
@ -283,7 +283,7 @@ JNIEXPORT jboolean JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_IsRunnin
|
||||
JNIEXPORT jboolean JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_NativeLibrary_IsRunningAndUnpaused(JNIEnv*, jclass)
|
||||
{
|
||||
return static_cast<jboolean>(Core::GetState() == Core::State::Running);
|
||||
return static_cast<jboolean>(Core::GetState(Core::System::GetInstance()) == Core::State::Running);
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetVersionString(JNIEnv* env,
|
||||
@ -458,7 +458,7 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SurfaceDestr
|
||||
host_identity_guard.Lock();
|
||||
}
|
||||
|
||||
if (Core::GetState() == Core::State::Running)
|
||||
if (Core::GetState(Core::System::GetInstance()) == Core::State::Running)
|
||||
Core::SetState(Core::State::Paused);
|
||||
}
|
||||
|
||||
@ -572,7 +572,7 @@ static void Run(JNIEnv* env, std::unique_ptr<BootParameters>&& boot, bool riivol
|
||||
if (BootManager::BootCore(Core::System::GetInstance(), std::move(boot), wsi))
|
||||
{
|
||||
static constexpr int WAIT_STEP = 25;
|
||||
while (Core::GetState() == Core::State::Starting)
|
||||
while (Core::GetState(Core::System::GetInstance()) == Core::State::Starting)
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(WAIT_STEP));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user