don't run SDL_RenderPresent in I_UpdateRender (#1077)

SDL's rendering functions operate on a backbuffer, the backbuffer should be
considered invalidated after each present; do not assume that previous contents
will exist between frames. Documentation:
https://wiki.libsdl.org/SDL2/SDL_RenderPresent
This commit is contained in:
Roman Fomin 2023-05-25 12:56:56 +07:00 committed by GitHub
parent 38d6d21751
commit 9c361a0043
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -421,8 +421,6 @@ static inline void I_UpdateRender (void)
{
SDL_RenderCopy(renderer, texture, NULL, NULL);
}
SDL_RenderPresent(renderer);
}
static void I_DrawDiskIcon(), I_RestoreDiskBackground();
@ -508,6 +506,8 @@ void I_FinishUpdate(void)
I_UpdateRender();
SDL_RenderPresent(renderer);
if (uncapped)
{
if (fpslimit >= TICRATE)