]> git.mxchange.org Git - quix0rs-blobwars.git/commitdiff
Enable vsync if available.
authorGuus Sliepen <guus@debian.org>
Sat, 8 Aug 2015 21:20:46 +0000 (23:20 +0200)
committerGuus Sliepen <guus@debian.org>
Sat, 8 Aug 2015 21:20:46 +0000 (23:20 +0200)
src/init.cpp

index d3bfea504f34d370533db4df0d4adf51e76a98a5..1e947c0c90db7c3718f5e6da250205c9fb8a13c3 100644 (file)
@@ -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);