mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-11-12 21:38:39 +00:00
Recreate the Vulkan GPU swap chain when resuming on Android
Fixes https://github.com/libsdl-org/SDL/issues/12957
This commit is contained in:
@@ -9703,6 +9703,13 @@ static bool VULKAN_INTERNAL_OnWindowResize(void *userdata, SDL_Event *e)
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user