mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-08-11 19:57:58 -05:00
Android: Detect when native code should flush unsaved data
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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user