From 446c4ead9876da6c19ab24469ac5e370259e8c85 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sat, 8 Aug 2015 23:20:46 +0200 Subject: [PATCH] Enable vsync if available. --- src/init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index d3bfea5..1e947c0 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -287,7 +287,7 @@ void initSystem() graphics.screen = SDL_CreateRGBSurface(0, 640, 480, 32, 0xff0000, 0xff00, 0xff, 0xff000000); graphics.window = SDL_CreateWindow("Blobwars: Metal Blob Solid", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, graphics.screen->w, graphics.screen->h, 0); - graphics.renderer = SDL_CreateRenderer(graphics.window, -1, 0); + graphics.renderer = SDL_CreateRenderer(graphics.window, -1, SDL_RENDERER_PRESENTVSYNC); SDL_RenderSetLogicalSize(graphics.renderer, graphics.screen->w, graphics.screen->h); graphics.texture = SDL_CreateTexture(graphics.renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, graphics.screen->w, graphics.screen->h); -- 2.39.5