Sfoglia il codice sorgente

tests: Clean up the renderer in the video test suite since it isn't automatic anymore.

Frank Praznik 1 anno fa
parent
commit
566d142938
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. 4 0
      test/testautomation_video.c

+ 4 - 0
test/testautomation_video.c

@@ -75,6 +75,10 @@ static SDL_Window *createVideoSuiteTestWindow(const char *title)
 static void destroyVideoSuiteTestWindow(SDL_Window *window)
 {
     if (window != NULL) {
+        SDL_Renderer *renderer = SDL_GetRenderer(window);
+        if (renderer) {
+            SDL_DestroyRenderer(renderer);
+        }
         SDL_DestroyWindow(window);
         window = NULL;
         SDLTest_AssertPass("Call to SDL_DestroyWindow()");