Recreate the Vulkan GPU swap chain when resuming on Android
Fixes https://github.com/libsdl-org/SDL/issues/12957
(cherry picked from commit 2a92a3c9c5)
This commit is contained in:
1 parent
205b5c9f44
commit
78756540cb
1 file changed
+7
@@ -9685,6 +9685,13 @@ static bool VULKAN_INTERNAL_OnWindowResize(void *userdata, SDL_Event *e)
|
|||||||
data->swapchainCreateHeight = e->window.data2;
|
data->swapchainCreateHeight = e->window.data2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SDL_PLATFORM_ANDROID
|
||||||
|
if (e->type == SDL_EVENT_DID_ENTER_BACKGROUND) {
|
||||||
|
data = VULKAN_INTERNAL_FetchWindowData(w);
|
||||||
|
data->needsSwapchainRecreate = true;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user