Permalink
Browse files

Android: Fix crash on shutdown/restart.

The text drawing textures needed to be deleted before shutting down their
allocator.  Fixes #10244.
  • Loading branch information...
unknownbrackets committed Dec 3, 2017
1 parent 5eba689 commit 79f03a0767c34879625fb29484e930e92a8249be
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 79f03a0

Please sign in to comment.