mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-02-14 07:43:14 +00:00
Improved error information when renderer creation fails
On Android, if you create a window with SDL_WINDOW_OPENGL, you can't create a Vulkan surface. The error message has been improved to reflect this, and the error is propagated back up to the application. Also added warn level logging if the renderer couldn't be created.
This commit is contained in:
@@ -1812,7 +1812,6 @@ static VkResult VULKAN_CreateDeviceResources(SDL_Renderer *renderer, SDL_Propert
|
||||
} else {
|
||||
if (!SDL_Vulkan_CreateSurface(renderer->window, rendererData->instance, NULL, &rendererData->surface)) {
|
||||
VULKAN_DestroyAll(renderer);
|
||||
SET_ERROR_MESSAGE("Vulkan_CreateSurface() failed");
|
||||
return VK_ERROR_UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user