mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-08-24 03:19:17 -05:00
Merge pull request #13594 from jordan-woyak/state-cleanups
State: Simplify interthread communication and general cleanups.
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Core/AchievementManager.h"
|
||||
#include "UICommon/UICommon.h"
|
||||
#include "jni/Host.h"
|
||||
|
||||
extern "C" {
|
||||
|
||||
@@ -18,4 +20,11 @@ Java_org_dolphinemu_dolphinemu_utils_ActivityTracker_setBackgroundExecutionAllow
|
||||
INFO_LOG_FMT(CORE, "SetBackgroundExecutionAllowed {}", allowed);
|
||||
AchievementManager::GetInstance().SetBackgroundExecutionAllowed(allowed);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_utils_ActivityTracker_flushUnsavedData(JNIEnv*, jclass)
|
||||
{
|
||||
HostThreadLock guard;
|
||||
UICommon::FlushUnsavedData();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -310,19 +310,17 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_eglBindAPI(J
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SaveState(JNIEnv*, jclass,
|
||||
jint slot,
|
||||
jboolean wait)
|
||||
jint slot)
|
||||
{
|
||||
HostThreadLock guard;
|
||||
State::Save(Core::System::GetInstance(), slot, wait);
|
||||
State::Save(Core::System::GetInstance(), slot);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SaveStateAs(JNIEnv* env, jclass,
|
||||
jstring path,
|
||||
jboolean wait)
|
||||
jstring path)
|
||||
{
|
||||
HostThreadLock guard;
|
||||
State::SaveAs(Core::System::GetInstance(), GetJString(env, path), wait);
|
||||
State::SaveAs(Core::System::GetInstance(), GetJString(env, path));
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_LoadState(JNIEnv*, jclass,
|
||||
|
||||
Reference in New Issue
Block a user