android: Game loading/shutting down indicators

This commit is contained in:
Charles Lombardo
2023-08-12 20:11:59 -04:00
parent 2b09d48329
commit 5b69f2967e
26 changed files with 311 additions and 210 deletions
+16
View File
@@ -335,6 +335,8 @@ public:
// Tear down the render window.
m_window.reset();
OnEmulationStopped(m_load_result);
}
void PauseEmulation() {
@@ -376,6 +378,8 @@ public:
m_system.InitializeDebugger();
}
OnEmulationStarted();
while (true) {
{
[[maybe_unused]] std::unique_lock lock(m_mutex);
@@ -511,6 +515,18 @@ private:
static_cast<jint>(progress), static_cast<jint>(max));
}
static void OnEmulationStarted() {
JNIEnv* env = IDCache::GetEnvForThread();
env->CallStaticVoidMethod(IDCache::GetNativeLibraryClass(),
IDCache::GetOnEmulationStarted());
}
static void OnEmulationStopped(Core::SystemResultStatus result) {
JNIEnv* env = IDCache::GetEnvForThread();
env->CallStaticVoidMethod(IDCache::GetNativeLibraryClass(),
IDCache::GetOnEmulationStopped(), static_cast<jint>(result));
}
private:
static EmulationSession s_instance;