WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] ioemu: Fall back to SDL rendering when GL

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] ioemu: Fall back to SDL rendering when GLX fails.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 28 Mar 2008 07:40:09 -0700
Delivery-date: Fri, 28 Mar 2008 07:40:10 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1206702943 0
# Node ID abae878a65f47deca68189c719fca5506326cda1
# Parent  50efc4b3ffdb7996ab58a4cb6d4d48fed197454f
ioemu: Fall back to SDL rendering when GLX fails.

From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/ioemu/sdl.c |   33 ++++++++++++++++++++++-----------
 1 files changed, 22 insertions(+), 11 deletions(-)

diff -r 50efc4b3ffdb -r abae878a65f4 tools/ioemu/sdl.c
--- a/tools/ioemu/sdl.c Fri Mar 28 09:50:50 2008 +0000
+++ b/tools/ioemu/sdl.c Fri Mar 28 11:15:43 2008 +0000
@@ -210,21 +210,32 @@ static void sdl_resize(DisplayState *ds,
 
  again:
     screen = SDL_SetVideoMode(w, h, 0, flags);
-#ifndef CONFIG_OPENGL
+
     if (!screen) {
         fprintf(stderr, "Could not open SDL display: %s\n", SDL_GetError());
+        if (opengl_enabled) {
+            /* Fallback to SDL */
+            opengl_enabled = 0;
+            ds->dpy_update = sdl_update;
+            ds->dpy_setdata = sdl_setdata;
+            sdl_resize(ds, w, h, linesize);
+            return;
+        }
         exit(1);
     }
-    if (!screen->pixels && (flags & SDL_HWSURFACE) && (flags & 
SDL_FULLSCREEN)) {
-        flags &= ~SDL_HWSURFACE;
-        goto again;
-    }
-
-    if (!screen->pixels) {
-        fprintf(stderr, "Could not open SDL display: %s\n", SDL_GetError());
-        exit(1);
-    }
-#endif
+
+    if (!opengl_enabled) {
+        if (!screen->pixels && (flags & SDL_HWSURFACE) && (flags & 
SDL_FULLSCREEN)) {
+            flags &= ~SDL_HWSURFACE;
+            goto again;
+        }
+
+        if (!screen->pixels) {
+            fprintf(stderr, "Could not open SDL display: %s\n", 
SDL_GetError());
+            exit(1);
+        }
+    }
+
     ds->width = w;
     ds->height = h;
     if (!ds->shared_buf) {

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] ioemu: Fall back to SDL rendering when GLX fails., Xen patchbot-unstable <=