Added SDL_EVENT_RENDER_DEVICE_LOST

This is sent when the device is lost and can't be recovered.

Also fixed the vulkan renderer so it returns errors appropriately and will log and break if debug mode is enabled.
This commit is contained in:
Sam Lantinga
2024-10-21 00:19:05 -07:00
parent 54e52d055f
commit 3d47877bb4
5 changed files with 266 additions and 212 deletions

View File

@@ -228,6 +228,7 @@ typedef enum SDL_EventType
/* Render events */
SDL_EVENT_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset and their contents need to be updated */
SDL_EVENT_RENDER_DEVICE_RESET, /**< The device has been reset and all textures need to be recreated */
SDL_EVENT_RENDER_DEVICE_LOST, /**< The device has been lost and can't be recovered. */
/* Reserved events for private platforms */
SDL_EVENT_PRIVATE0 = 0x4000,