Simplify Flip Mode rendering code with SDL_RenderCopyEx

Previously, Flip Mode rendering had to be complicated and allocate
another buffer to call FlipSurfaceVerticle, and it was just a mess.

Instead, why not just do SDL_RenderCopyEx, and let SDL flip the screen
for us? This ends up pretty massively simplifying the rendering code.
This commit is contained in:
Misa
2021-08-29 13:31:42 -07:00
parent 23a2f57a70
commit c58c357a81
4 changed files with 29 additions and 70 deletions

View File

@@ -750,7 +750,7 @@ static void inline deltaloop(void)
{
implfunc->func();
gameScreen.FlipScreen();
gameScreen.FlipScreen(graphics.flipmode);
}
}
}
@@ -781,7 +781,7 @@ static void unfocused_run(void)
#undef FLIP
}
graphics.render();
gameScreen.FlipScreen();
gameScreen.FlipScreen(graphics.flipmode);
//We are minimised, so lets put a bit of a delay to save CPU
#ifndef __EMSCRIPTEN__
SDL_Delay(100);