Added an event SDL_RENDER_DEVICE_RESET, which is triggered on Direct3D 11 when the device has been lost and all textures need to be recreated.

This commit is contained in:
Sam Lantinga 2014-03-23 23:09:22 -07:00
parent 4d02b5b07d
commit c0e9a9afaf
3 changed files with 10 additions and 3 deletions

View file

@ -1593,9 +1593,8 @@ D3D11_HandleDeviceLost(SDL_Renderer * renderer)
/* Let the application know that the device has been reset */
{
/* TODO/FIXME: consider adding a new SDL event to indicate that the entire rendering device has been reset, not just render targets! */
SDL_Event event;
event.type = SDL_RENDER_TARGETS_RESET;
event.type = SDL_RENDER_DEVICE_RESET;
SDL_PushEvent(&event);
}