]> xenbits.xen.org Git - xenclient/ioemu.git/commitdiff
fix sdl mode
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 17 Apr 2009 16:40:32 +0000 (17:40 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 17 Apr 2009 16:40:32 +0000 (17:40 +0100)
When I use "sdl=1 vnc=0" in hvm guest config file, qemu-dm would exit
due to a de-reference to a NULL pointer. The regression is introduced
by 3793d85f111a0dfe055ca8ac17a9d1881af43240.  The attached patch fixes
the issue.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
sdl.c

diff --git a/sdl.c b/sdl.c
index 39ff4e3a99ff041ee1c3a1f6a5110af813e93062..e0cd07b78fb81613ebb45def4b35338b4a38883f 100644 (file)
--- a/sdl.c
+++ b/sdl.c
@@ -198,7 +198,7 @@ static void do_sdl_resize(int new_width, int new_height, int bpp)
             opengl_enabled = 0;
             dcl->dpy_update = sdl_update;
             dcl->dpy_setdata = sdl_setdata;
-            do_sdl_resize(real_screen->w, real_screen->h, real_screen->format->BitsPerPixel);
+            do_sdl_resize(width, height, bpp);
             return;
         }
         fprintf(stderr, "Could not open SDL display\n");