changeset 690:b87d8d4c205d

Fixed use of SDL with XInitThreads()
author Sam Lantinga <slouken@libsdl.org>
date Sat, 23 Aug 2003 23:12:19 +0000
parents 5bb080d35049
children 609543e2b3a1
files configure.in src/video/Xext/README src/video/Xext/Xxf86vm/XF86VMode.c
diffstat 3 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/configure.in	Fri Aug 22 05:51:19 2003 +0000
+++ b/configure.in	Sat Aug 23 23:12:19 2003 +0000
@@ -553,7 +553,7 @@
         AC_PATH_X
         AC_PATH_XTRA
         if test x$have_x = xyes; then
-            CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_X11 -I$srcdir/include -I$srcdir/src/video"
+            CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_X11 -DXTHREADS -I$srcdir/include -I$srcdir/src/video"
             if test x$ac_cv_func_shmat != xyes; then
                 CFLAGS="$CFLAGS -DNO_SHARED_MEMORY"
             fi
--- a/src/video/Xext/README	Fri Aug 22 05:51:19 2003 +0000
+++ b/src/video/Xext/README	Sat Aug 23 23:12:19 2003 +0000
@@ -7,3 +7,4 @@
 Linux platforms.  Since these libraries haven't become standard yet,
 we'll just include them directly.
 
+These sources are synchronized with XFree86 4.2.1
--- a/src/video/Xext/Xxf86vm/XF86VMode.c	Fri Aug 22 05:51:19 2003 +0000
+++ b/src/video/Xext/Xxf86vm/XF86VMode.c	Sat Aug 23 23:12:19 2003 +0000
@@ -344,6 +344,8 @@
 	else
             _XEatData(dpy, (rep.modecount) * sizeof(xXF86VidModeModeInfo));
         Xfree(modelines);
+        UnlockDisplay(dpy);
+        SyncHandle();
         return False;
     }
     mdinfptr = (SDL_NAME(XF86VidModeModeInfo) *) (
@@ -925,6 +927,8 @@
 	if (!(monitor->vendor = (char *)Xcalloc(rep.vendorLength + 1, 1))) {
 	    _XEatData(dpy, (rep.nhsync + rep.nvsync) * 4 +
 		      ((rep.vendorLength+3) & ~3) + ((rep.modelLength+3) & ~3));
+            UnlockDisplay(dpy);
+            SyncHandle();
 	    return False;
 	}
     } else {
@@ -936,6 +940,8 @@
 		      ((rep.vendorLength+3) & ~3) + ((rep.modelLength+3) & ~3));
 	    if (monitor->vendor)
 		Xfree(monitor->vendor);
+            UnlockDisplay(dpy);
+            SyncHandle();
 	    return False;
 	}
     } else {
@@ -949,6 +955,8 @@
 	    Xfree(monitor->vendor);
 	if (monitor->model)
 	    Xfree(monitor->model);
+        UnlockDisplay(dpy);
+        SyncHandle();
 	return False;
     }
     if (!(monitor->vsync = Xcalloc(rep.nvsync, sizeof(SDL_NAME(XF86VidModeSyncRange))))) {
@@ -959,6 +967,8 @@
 	if (monitor->model)
 	    Xfree(monitor->model);
 	Xfree(monitor->hsync);
+        UnlockDisplay(dpy);
+        SyncHandle();
 	return False;
     }
     for (i = 0; i < rep.nhsync; i++) {
@@ -1096,6 +1106,8 @@
     if (!(dotclocks = (int*) Xcalloc(rep.clocks, sizeof(int)))) {
         _XEatData(dpy, (rep.clocks) * 4);
         Xfree(dotclocks);
+        UnlockDisplay(dpy);
+        SyncHandle();
         return False;
     }