diff options
| author | Ryan Houdek <Sonicadvance1@gmail.com> | 2015-06-07 23:18:56 -0400 |
|---|---|---|
| committer | Ryan Houdek <Sonicadvance1@gmail.com> | 2015-06-07 23:18:56 -0400 |
| commit | 51b440fbcfe8a8f9314c2c465ff2285dc197e81a (patch) | |
| tree | d29733ef87a738ef46312cd8f8c499bb1de00ba1 /Source/Core | |
| parent | 49a0adb2e92c87a8d22797e0f9a3354ff5d19429 (diff) | |
| parent | 4faff3cf626b450852d1f3bf7802ed47520426fb (diff) | |
Merge pull request #2449 from sigmabeta/android-decouple-surfaceview
\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 f1a789b7f3..4706a63ccf 100644 --- a/Source/Core/DolphinWX/MainAndroid.cpp +++ b/Source/Core/DolphinWX/MainAndroid.cpp @@ -595,8 +595,16 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_CacheClasses 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); @@ -608,8 +616,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); |
