From 0f278a2748fdde91563dfa1b441481b07b9f8997 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Wed, 24 Aug 2011 20:01:40 +0200 Subject: [PATCH] Enable double buffering. This seems to improve performance (probably because this prevents the need to lock the screen surface), and might get rid of tearing. --- code/init.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/init.cpp b/code/init.cpp index ca45fc0..629e728 100644 --- a/code/init.cpp +++ b/code/init.cpp @@ -184,9 +184,9 @@ void initSystem() SDL_WM_SetIcon(loadImage("gfx/alienDevice.png"), NULL); if (currentGame.fullScreen) - graphics.screen = SDL_SetVideoMode(800, 600, 16, SDL_HWPALETTE|SDL_FULLSCREEN); + graphics.screen = SDL_SetVideoMode(800, 600, 16, SDL_DOUBLEBUF|SDL_HWPALETTE|SDL_FULLSCREEN); else - graphics.screen = SDL_SetVideoMode(800, 600, 0, SDL_HWPALETTE); + graphics.screen = SDL_SetVideoMode(800, 600, 0, SDL_DOUBLEBUF|SDL_HWPALETTE); if (graphics.screen == NULL) { printf("Couldn't set 800x600x16 video mode: %s\n", SDL_GetError());