Permalink
Browse files

Merge pull request #10248 from unknownbrackets/android

Android: Fix crash on shutdown/restart
  • Loading branch information...
hrydgard committed Dec 4, 2017
2 parents 5eba689 + 79f03a0 commit 7f5ba21402b36ae79e5f2b77066e71669cd3c0ae
Showing with 3 additions and 3 deletions.
  1. +2 −2 android/jni/app-android.cpp
  2. +1 −1 android/src/org/ppsspp/ppsspp/NativeActivity.java
@@ -359,10 +359,10 @@ bool AndroidVulkanContext::Init(ANativeWindow *wnd, int desiredBackbufferSizeX,
void AndroidVulkanContext::Shutdown() {
ILOG("AndroidVulkanContext::Shutdown");
draw_->HandleEvent(Draw::Event::LOST_BACKBUFFER, g_Vulkan->GetBackbufferWidth(), g_Vulkan->GetBackbufferHeight());
delete draw_;
draw_ = nullptr;
ILOG("Calling NativeShutdownGraphics");
NativeShutdownGraphics();
delete draw_;
draw_ = nullptr;
g_Vulkan->WaitUntilQueueIdle();
g_Vulkan->DestroyObjects();
g_Vulkan->DestroyDevice();
@@ -541,7 +541,7 @@ public void surfaceCreated(SurfaceHolder holder) {
if (badOrientationCount < 3 && requestedPortrait != detectedPortrait) {
Log.e(TAG, "Bad orientation detected (w=" + pixelWidth + " h=" + pixelHeight + "! Recreating activity.");
badOrientationCount++;
recreate();;
recreate();
return;
} else if (requestedPortrait == detectedPortrait) {
badOrientationCount = 0;

0 comments on commit 7f5ba21

Please sign in to comment.