diff options
| author | Eder Bastos <bastos.eder@gmail.com> | 2015-05-24 12:04:32 -0400 |
|---|---|---|
| committer | Eder Bastos <bastos.eder@gmail.com> | 2015-05-24 19:40:11 -0400 |
| commit | 4faff3cf626b450852d1f3bf7802ed47520426fb (patch) | |
| tree | 8f93ad2df6b6e978d2bc4e2bf8974a2c101e1cc6 /Source/Core | |
| parent | ad9dae30a850cb31576f01ab80441e79d630f345 (diff) | |
Android: Decouple SurfaceView initialization and emulation start.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/DolphinWX/MainAndroid.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/Core/DolphinWX/MainAndroid.cpp b/Source/Core/DolphinWX/MainAndroid.cpp index c274deb5fb..773d4253e7 100644 --- a/Source/Core/DolphinWX/MainAndroid.cpp +++ b/Source/Core/DolphinWX/MainAndroid.cpp @@ -561,8 +561,16 @@ JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetUserDi JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_Run(JNIEnv *env, jobject obj, jobject _surf) { + __android_log_print(ANDROID_LOG_INFO, DOLPHIN_TAG, "Running : %s", g_filename.c_str()); + surf = ANativeWindow_fromSurface(env, _surf); + if (surf == nullptr) + { + __android_log_print(ANDROID_LOG_ERROR, DOLPHIN_TAG, "Error: Surface is null."); + return; + } + // Install our callbacks OSD::AddCallback(OSD::OSD_INIT, ButtonManager::Init); OSD::AddCallback(OSD::OSD_SHUTDOWN, ButtonManager::Shutdown); @@ -574,8 +582,11 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_Run(JNIEnv * // No use running the loop when booting fails if ( BootManager::BootCore( g_filename.c_str() ) ) + { + PowerPC::Start(); while (PowerPC::GetState() != PowerPC::CPU_POWERDOWN) updateMainFrameEvent.Wait(); + } UICommon::Shutdown(); ANativeWindow_release(surf); |
