1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-25 05:58:30 +02: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)
{
ed.state = EditorState_DRAW;
gameScreen.recacheTextures();
}
else
{

View File

@ -170,9 +170,9 @@ void Screen::ResizeScreen(int x, int y)
else
{
int result = SDL_SetWindowFullscreen(m_window, 0);
recacheTextures();
if (result != 0)
{
recacheTextures();
vlog_error("Error: could not set the game to windowed mode: %s", SDL_GetError());
return;
}
@ -185,6 +185,7 @@ void Screen::ResizeScreen(int x, int y)
SDL_WINDOWPOS_CENTERED_DISPLAY(windowDisplay)
);
}
recacheTextures();
}
}