mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user