From: Keir Fraser Date: Thu, 20 Mar 2008 10:47:17 +0000 (+0000) Subject: ioemu: Fix non-openGL resize X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14247^2~6 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=2cd23e48e920110e04879259588fd9e76e1bb295;p=xen.git ioemu: Fix non-openGL resize We can not resize when OpenGL is not enabled. Signed-off-by: Samuel Thibault --- diff --git a/tools/ioemu/sdl.c b/tools/ioemu/sdl.c index 7f641074d1..aacc54f041 100644 --- a/tools/ioemu/sdl.c +++ b/tools/ioemu/sdl.c @@ -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