From 3991633ad2cf15ee87b7eceaa39f7d2b93a07a13 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Tue, 3 May 2016 21:40:13 -0500 Subject: [PATCH] Vsync solves most of the screen tearing issues. --- src/emulator.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/emulator.c b/src/emulator.c index f623b6b..3f430d7 100644 --- a/src/emulator.c +++ b/src/emulator.c @@ -66,6 +66,7 @@ static void setup_graphics(bool fullscreen, unsigned scale) SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "nearest"); SDL_SetWindowTitle(emu.window, "crater"); SDL_ShowCursor(SDL_DISABLE); + SDL_GL_SetSwapInterval(1); // Vsync SDL_SetRenderDrawColor(emu.renderer, 0x00, 0x00, 0x00, 0xFF); SDL_RenderClear(emu.renderer);