Fixed use of SDL with XInitThreads()
authorSam Lantinga <slouken@libsdl.org>
Sat, 23 Aug 2003 23:12:19 +0000
changeset 690b87d8d4c205d
parent 689 5bb080d35049
child 691 609543e2b3a1
Fixed use of SDL with XInitThreads()
configure.in
src/video/Xext/README
src/video/Xext/Xxf86vm/XF86VMode.c
     1.1 --- a/configure.in	Fri Aug 22 05:51:19 2003 +0000
     1.2 +++ b/configure.in	Sat Aug 23 23:12:19 2003 +0000
     1.3 @@ -553,7 +553,7 @@
     1.4          AC_PATH_X
     1.5          AC_PATH_XTRA
     1.6          if test x$have_x = xyes; then
     1.7 -            CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_X11 -I$srcdir/include -I$srcdir/src/video"
     1.8 +            CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_X11 -DXTHREADS -I$srcdir/include -I$srcdir/src/video"
     1.9              if test x$ac_cv_func_shmat != xyes; then
    1.10                  CFLAGS="$CFLAGS -DNO_SHARED_MEMORY"
    1.11              fi
     2.1 --- a/src/video/Xext/README	Fri Aug 22 05:51:19 2003 +0000
     2.2 +++ b/src/video/Xext/README	Sat Aug 23 23:12:19 2003 +0000
     2.3 @@ -7,3 +7,4 @@
     2.4  Linux platforms.  Since these libraries haven't become standard yet,
     2.5  we'll just include them directly.
     2.6  
     2.7 +These sources are synchronized with XFree86 4.2.1
     3.1 --- a/src/video/Xext/Xxf86vm/XF86VMode.c	Fri Aug 22 05:51:19 2003 +0000
     3.2 +++ b/src/video/Xext/Xxf86vm/XF86VMode.c	Sat Aug 23 23:12:19 2003 +0000
     3.3 @@ -344,6 +344,8 @@
     3.4  	else
     3.5              _XEatData(dpy, (rep.modecount) * sizeof(xXF86VidModeModeInfo));
     3.6          Xfree(modelines);
     3.7 +        UnlockDisplay(dpy);
     3.8 +        SyncHandle();
     3.9          return False;
    3.10      }
    3.11      mdinfptr = (SDL_NAME(XF86VidModeModeInfo) *) (
    3.12 @@ -925,6 +927,8 @@
    3.13  	if (!(monitor->vendor = (char *)Xcalloc(rep.vendorLength + 1, 1))) {
    3.14  	    _XEatData(dpy, (rep.nhsync + rep.nvsync) * 4 +
    3.15  		      ((rep.vendorLength+3) & ~3) + ((rep.modelLength+3) & ~3));
    3.16 +            UnlockDisplay(dpy);
    3.17 +            SyncHandle();
    3.18  	    return False;
    3.19  	}
    3.20      } else {
    3.21 @@ -936,6 +940,8 @@
    3.22  		      ((rep.vendorLength+3) & ~3) + ((rep.modelLength+3) & ~3));
    3.23  	    if (monitor->vendor)
    3.24  		Xfree(monitor->vendor);
    3.25 +            UnlockDisplay(dpy);
    3.26 +            SyncHandle();
    3.27  	    return False;
    3.28  	}
    3.29      } else {
    3.30 @@ -949,6 +955,8 @@
    3.31  	    Xfree(monitor->vendor);
    3.32  	if (monitor->model)
    3.33  	    Xfree(monitor->model);
    3.34 +        UnlockDisplay(dpy);
    3.35 +        SyncHandle();
    3.36  	return False;
    3.37      }
    3.38      if (!(monitor->vsync = Xcalloc(rep.nvsync, sizeof(SDL_NAME(XF86VidModeSyncRange))))) {
    3.39 @@ -959,6 +967,8 @@
    3.40  	if (monitor->model)
    3.41  	    Xfree(monitor->model);
    3.42  	Xfree(monitor->hsync);
    3.43 +        UnlockDisplay(dpy);
    3.44 +        SyncHandle();
    3.45  	return False;
    3.46      }
    3.47      for (i = 0; i < rep.nhsync; i++) {
    3.48 @@ -1096,6 +1106,8 @@
    3.49      if (!(dotclocks = (int*) Xcalloc(rep.clocks, sizeof(int)))) {
    3.50          _XEatData(dpy, (rep.clocks) * 4);
    3.51          Xfree(dotclocks);
    3.52 +        UnlockDisplay(dpy);
    3.53 +        SyncHandle();
    3.54          return False;
    3.55      }
    3.56