Explorar o código

Call SDL_DiscardAllCommands() for the software renderer as well

Sam Lantinga hai 1 ano
pai
achega
1a38960eee
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  1. 1 2
      src/render/SDL_render.c

+ 1 - 2
src/render/SDL_render.c

@@ -5217,9 +5217,8 @@ void SDL_DestroyRendererWithoutFreeing(SDL_Renderer *renderer)
     if (renderer->software) {
         // Make sure all drawing to a surface is complete
         FlushRenderCommands(renderer);
-    } else {
-        SDL_DiscardAllCommands(renderer);
     }
+    SDL_DiscardAllCommands(renderer);
 
     if (renderer->debug_char_texture_atlas) {
         SDL_DestroyTexture(renderer->debug_char_texture_atlas);