mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59:43 +01:00
Fix texture cache missing in certain situations after resizing the window
This commit is contained in:
parent
7b40a052ed
commit
6952c58878
2 changed files with 3 additions and 1 deletions
|
@ -3511,6 +3511,7 @@ void editorinput(void)
|
||||||
if (game.currentmenuname == Menu::ed_settings)
|
if (game.currentmenuname == Menu::ed_settings)
|
||||||
{
|
{
|
||||||
ed.state = EditorState_DRAW;
|
ed.state = EditorState_DRAW;
|
||||||
|
gameScreen.recacheTextures();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -170,9 +170,9 @@ void Screen::ResizeScreen(int x, int y)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int result = SDL_SetWindowFullscreen(m_window, 0);
|
int result = SDL_SetWindowFullscreen(m_window, 0);
|
||||||
recacheTextures();
|
|
||||||
if (result != 0)
|
if (result != 0)
|
||||||
{
|
{
|
||||||
|
recacheTextures();
|
||||||
vlog_error("Error: could not set the game to windowed mode: %s", SDL_GetError());
|
vlog_error("Error: could not set the game to windowed mode: %s", SDL_GetError());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -185,6 +185,7 @@ void Screen::ResizeScreen(int x, int y)
|
||||||
SDL_WINDOWPOS_CENTERED_DISPLAY(windowDisplay)
|
SDL_WINDOWPOS_CENTERED_DISPLAY(windowDisplay)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
recacheTextures();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue