Skip to content

Commit b0e70e1

Browse files
mardyWinterMute
authored andcommitted
ogc: flush the FIFO after executing the command queue
It can happens that the client program immediately calls SDL_DestroyTexture() after draawing it. Luckily for us, SDL is smart enough to realize that the texture has been used in a draw operation and issues a SDL_RenderFlush() so that all the operations get executed. But this means that on our side, we must also make sure that when we return from OGC_RunCommandQueue() the texture data is no longer needed. The call to GX_DrawDone() does exactly this.
1 parent 50697f7 commit b0e70e1

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/render/ogc/SDL_render_ogc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,7 @@ static int OGC_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cmd, v
533533
cmd = cmd->next;
534534
}
535535

536+
GX_DrawDone();
536537
return 0;
537538
}
538539

0 commit comments

Comments
 (0)