1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-22 17:49:43 +01:00

Fix texture cache missing in certain situations after resizing the window

This commit is contained in:
AllyTally 2023-08-22 22:03:10 -03:00 committed by Misa Elizabeth Kai
parent 7b40a052ed
commit 6952c58878
2 changed files with 3 additions and 1 deletions

View file

@ -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
{ {

View file

@ -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();
} }
} }