]> xenbits.xensource.com Git - qemu-xen-3.3-testing.git/commitdiff
sdl screen update: do not use SDL_Flip xen-3.3.2-rc5
authorIan Jackson <ian.jackson@eu.citrix.com>
Wed, 8 Jul 2009 13:55:45 +0000 (14:55 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 8 Jul 2009 13:55:45 +0000 (14:55 +0100)
Without this patch every time there is an update we refresh the whole
screen!

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
[ submitted by Stefano for 3.3-testing -iwj ]

sdl.c

diff --git a/sdl.c b/sdl.c
index 9afd884094a8b8f7200d5b7f8b06da8324a5fd69..4f8b7f5641e5b1b9772a4b8dc5f51b071afb714e 100644 (file)
--- a/sdl.c
+++ b/sdl.c
@@ -171,7 +171,7 @@ static void sdl_update(DisplayState *ds, int x, int y, int w, int h)
         rec.h = h;
         SDL_BlitSurface(shared, &rec, screen, &rec);
     }
-    SDL_Flip(screen);
+    SDL_UpdateRect(screen, x, y, w, h);
 }
 
 static void sdl_setdata(DisplayState *ds, void *pixels)
@@ -229,7 +229,7 @@ static void sdl_resize_shared(DisplayState *ds, int w, int h, int depth, int lin
         flags = SDL_OPENGL|SDL_RESIZABLE;
     else
 #endif
-        flags = SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_HWACCEL|SDL_DOUBLEBUF|SDL_HWPALETTE;
+        flags = SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_HWACCEL|SDL_HWPALETTE;
 
     if (gui_fullscreen) {
         flags |= SDL_FULLSCREEN;