Finish any drawing when destroying a software renderer
Fixes the SDL3 version of https://github.com/libsdl-org/sdl2-compat/issues/373
This commit is contained in:
parent
1a853973ab
commit
8f4c5e15f1
1 changed files with 6 additions and 1 deletions
|
@ -5214,7 +5214,12 @@ void SDL_DestroyRendererWithoutFreeing(SDL_Renderer *renderer)
|
|||
SDL_RemoveWindowRenderer(renderer->window, renderer);
|
||||
}
|
||||
|
||||
if (renderer->software) {
|
||||
// Make sure all drawing to a surface is complete
|
||||
FlushRenderCommands(renderer);
|
||||
} else {
|
||||
SDL_DiscardAllCommands(renderer);
|
||||
}
|
||||
|
||||
if (renderer->debug_char_texture_atlas) {
|
||||
SDL_DestroyTexture(renderer->debug_char_texture_atlas);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue