Browse Source

SDL_test: clear text cache on exit event

Anonymous Maarten 1 year ago
parent
commit
12c0be028e
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/test/SDL_test_common.c

+ 2 - 0
src/test/SDL_test_common.c

@@ -2046,6 +2046,8 @@ void SDLTest_CommonEvent(SDLTest_CommonState *state, SDL_Event *event, int *done
     {
         SDL_Window *window = SDL_GetWindowFromID(event->window.windowID);
         if (window) {
+            /* Clear cache to avoid stale textures */
+            SDLTest_CleanupTextDrawing();
             for (i = 0; i < state->num_windows; ++i) {
                 if (window == state->windows[i]) {
                     if (state->targets[i]) {