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.
This commit is contained in:
Guus Sliepen 2011-08-24 20:01:40 +02:00
parent 943a4c7bf3
commit 0f278a2748
1 changed files with 2 additions and 2 deletions

View File

@ -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());