mirror of
https://github.com/blupi-games/planetblupi
synced 2024-12-30 10:15:36 +01:00
Reload the textures when the renderer is asking for
It seems that it fixes textures lose completly.
This commit is contained in:
parent
2d80222257
commit
3aba743cd4
@ -385,6 +385,11 @@ HandleEvent (const SDL_Event & event)
|
||||
}
|
||||
break;
|
||||
|
||||
case SDL_RENDER_DEVICE_RESET:
|
||||
case SDL_RENDER_TARGETS_RESET:
|
||||
g_pPixmap->ReloadTargetTextures ();
|
||||
break;
|
||||
|
||||
case SDL_USEREVENT:
|
||||
{
|
||||
switch (event.user.code)
|
||||
|
@ -1702,7 +1702,6 @@ CEvent::SetFullScreen (bool bFullScreen)
|
||||
SDL_WINDOWPOS_CENTERED_DISPLAY (displayIndex));
|
||||
|
||||
m_pPixmap->LoadCursors (g_zoom);
|
||||
m_pPixmap->ReloadTargetTextures ();
|
||||
|
||||
/* Force this update before otherwise the coordinates retrieved with
|
||||
* the Warp SDL function are corresponding to the previous size.
|
||||
@ -1761,7 +1760,6 @@ CEvent::SetWindowSize (Uint8 prevScale, Uint8 newScale)
|
||||
SDL_WINDOWPOS_CENTERED_DISPLAY (displayIndex));
|
||||
|
||||
m_pPixmap->LoadCursors (newScale);
|
||||
m_pPixmap->ReloadTargetTextures ();
|
||||
|
||||
/* Force this update before otherwise the coordinates retrieved with
|
||||
* the Warp SDL function are corresponding to the previous size.
|
||||
|
Loading…
x
Reference in New Issue
Block a user