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

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