From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Thibault Subject: [PATCH] ioemu: Fix non-openGL resize Date: Wed, 19 Mar 2008 18:17:03 +0000 Message-ID: <20080319181703.GG9372@implementation.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org ioemu: Fix non-openGL resize We can not resize when OpenGL is not enabled. Signed-off-by: Samuel Thibault diff -r b4f6d626c41f tools/ioemu/sdl.c --- a/tools/ioemu/sdl.c Wed Mar 19 17:10:26 2008 +0000 +++ b/tools/ioemu/sdl.c Wed Mar 19 18:13:32 2008 +0000 @@ -664,10 +664,12 @@ static void sdl_refresh(DisplayState *ds #ifdef CONFIG_OPENGL case SDL_VIDEORESIZE: { - SDL_ResizeEvent *rev = &ev->resize; - screen = SDL_SetVideoMode(rev->w, rev->h, 0, SDL_OPENGL|SDL_RESIZABLE); - opengl_setdata(ds, ds->data); - opengl_update(ds, 0, 0, ds->width, ds->height); + if (ds->shared_buf && opengl_enabled) { + SDL_ResizeEvent *rev = &ev->resize; + screen = SDL_SetVideoMode(rev->w, rev->h, 0, SDL_OPENGL|SDL_RESIZABLE); + opengl_setdata(ds, ds->data); + opengl_update(ds, 0, 0, ds->width, ds->height); + } break; } #endif