diff src/video/x11/SDL_x11yuv.c @ 1575:3ba88cb7eb1b

Updated dynamic X11 code. See details in Bugzilla #170.
author Ryan C. Gordon <icculus@icculus.org>
date Wed, 22 Mar 2006 05:00:59 +0000
parents d910939febfa
children f1211a4b7380
line wrap: on
line diff
--- a/src/video/x11/SDL_x11yuv.c	Wed Mar 22 04:51:44 2006 +0000
+++ b/src/video/x11/SDL_x11yuv.c	Wed Mar 22 05:00:59 2006 +0000
@@ -151,7 +151,7 @@
 					}
 				}
 				if ( formats ) {
-					pXFree(formats);
+					XFree(formats);
 				}
 			}
 		}
@@ -200,21 +200,21 @@
 		unsigned int i;
 
 		SDL_NAME(XvSelectPortNotify)(GFX_Display, xv_port, True);
-		X_handler = pXSetErrorHandler(xv_errhandler);
+		X_handler = XSetErrorHandler(xv_errhandler);
 		for ( i=0; i < sizeof(attr)/(sizeof attr[0]); ++i ) {
 			Atom a;
 
 			xv_error = False;
-			a = pXInternAtom(GFX_Display, attr[i], True);
+			a = XInternAtom(GFX_Display, attr[i], True);
 			if ( a != None ) {
      				SDL_NAME(XvSetPortAttribute)(GFX_Display, xv_port, a, 1);
-				pXSync(GFX_Display, True);
+				XSync(GFX_Display, True);
 				if ( ! xv_error ) {
 					break;
 				}
 			}
 		}
-		pXSetErrorHandler(X_handler);
+		XSetErrorHandler(X_handler);
 		SDL_NAME(XvSelectPortNotify)(GFX_Display, xv_port, False);
 	}
 
@@ -254,7 +254,7 @@
 #ifdef PITCH_WORKAROUND
 	if ( hwdata->image != NULL && hwdata->image->pitches[0] != (width*bpp) ) {
 		/* Ajust overlay width according to pitch */ 
-		pXFree(hwdata->image);
+		XFree(hwdata->image);
 		width = hwdata->image->pitches[0] / bpp;
 		hwdata->image = SDL_NAME(XvShmCreateImage)(GFX_Display, xv_port, format,
 							   0, width, height, yuvshm);
@@ -269,10 +269,10 @@
 			yuvshm->readOnly = False;
 			if ( yuvshm->shmaddr != (char *)-1 ) {
 				shm_error = False;
-				X_handler = pXSetErrorHandler(shm_errhandler);
-				pXShmAttach(GFX_Display, yuvshm);
-				pXSync(GFX_Display, True);
-				pXSetErrorHandler(X_handler);
+				X_handler = XSetErrorHandler(shm_errhandler);
+				XShmAttach(GFX_Display, yuvshm);
+				XSync(GFX_Display, True);
+				XSetErrorHandler(X_handler);
 				if ( shm_error )
 					shmdt(yuvshm->shmaddr);
 			} else {
@@ -283,7 +283,7 @@
 			shm_error = True;
 		}
 		if ( shm_error ) {
-			pXFree(hwdata->image);
+			XFree(hwdata->image);
 			hwdata->yuv_use_mitshm = 0;
 		} else {
 			hwdata->image->data = yuvshm->shmaddr;
@@ -298,7 +298,7 @@
 #ifdef PITCH_WORKAROUND
 		if ( hwdata->image != NULL && hwdata->image->pitches[0] != (width*bpp) ) {
 			/* Ajust overlay width according to pitch */ 
-			pXFree(hwdata->image);
+			XFree(hwdata->image);
 			width = hwdata->image->pitches[0] / bpp;
 			hwdata->image = SDL_NAME(XvCreateImage)(GFX_Display, xv_port, format,
 								0, width, height);
@@ -372,7 +372,7 @@
 				     hwdata->image, 0, 0, overlay->w, overlay->h,
 				     dstrect->x, dstrect->y, dstrect->w, dstrect->h);
 	}
-	pXSync(GFX_Display, False);
+	XSync(GFX_Display, False);
 	return(0);
 }
 
@@ -385,12 +385,12 @@
 		SDL_NAME(XvUngrabPort)(GFX_Display, hwdata->port, CurrentTime);
 #ifndef NO_SHARED_MEMORY
 		if ( hwdata->yuv_use_mitshm ) {
-			pXShmDetach(GFX_Display, &hwdata->yuvshm);
+			XShmDetach(GFX_Display, &hwdata->yuvshm);
 			shmdt(hwdata->yuvshm.shmaddr);
 		}
 #endif
 		if ( hwdata->image ) {
-			pXFree(hwdata->image);
+			XFree(hwdata->image);
 		}
 		SDL_free(hwdata);
 	}