State: Avoid Global System Accessor

This commit is contained in:
mitaclaw
2024-03-01 10:41:48 -08:00
parent 5a81916ee9
commit 0d4cb5ddc7
10 changed files with 81 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