mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-05 17:36:25 +00:00
Added support for simulated vsync in the renderer
This kicks in if the platform doesn't support vsync directly, or if the present fails for some reason (e.g. minimized on some platforms) Fixes https://github.com/libsdl-org/SDL/issues/5134
This commit is contained in:
@@ -983,14 +983,15 @@ SW_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
|
||||
format, pixels, pitch);
|
||||
}
|
||||
|
||||
static void
|
||||
static int
|
||||
SW_RenderPresent(SDL_Renderer * renderer)
|
||||
{
|
||||
SDL_Window *window = renderer->window;
|
||||
|
||||
if (window) {
|
||||
SDL_UpdateWindowSurface(window);
|
||||
if (!window) {
|
||||
return -1;
|
||||
}
|
||||
return SDL_UpdateWindowSurface(window);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user