Merge pull request #12606 from mitaclaw/state-global-system

State: Avoid Global System Accessor
This commit is contained in:
Admiral H. Curtiss
2024-03-22 04:27:12 +01:00
committed by GitHub
10 changed files with 79 additions and 75 deletions

View File

@ -315,7 +315,7 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SaveState(JN
jboolean wait)
{
HostThreadLock guard;
State::Save(slot, wait);
State::Save(Core::System::GetInstance(), slot, wait);
}
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SaveStateAs(JNIEnv* env, jclass,
@ -323,21 +323,21 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SaveStateAs(
jboolean wait)
{
HostThreadLock guard;
State::SaveAs(GetJString(env, path), wait);
State::SaveAs(Core::System::GetInstance(), GetJString(env, path), wait);
}
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_LoadState(JNIEnv*, jclass,
jint slot)
{
HostThreadLock guard;
State::Load(slot);
State::Load(Core::System::GetInstance(), slot);
}
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_LoadStateAs(JNIEnv* env, jclass,
jstring path)
{
HostThreadLock guard;
State::LoadAs(GetJString(env, path));
State::LoadAs(Core::System::GetInstance(), GetJString(env, path));
}
JNIEXPORT jlong JNICALL