src/video/x11/SDL_x11yuv.c
branchSDL-1.2
changeset 6099 c5d651a8b679
parent 4159 a1b03ba2fcd0
child 6137 4720145f848b
equal deleted inserted replaced
6087:185f8588deaa 6099:c5d651a8b679
   328 	hwdata->image = SDL_NAME(XvShmCreateImage)(GFX_Display, xv_port, format,
   328 	hwdata->image = SDL_NAME(XvShmCreateImage)(GFX_Display, xv_port, format,
   329 						   0, width, height, yuvshm);
   329 						   0, width, height, yuvshm);
   330 #ifdef PITCH_WORKAROUND
   330 #ifdef PITCH_WORKAROUND
   331 	if ( hwdata->image != NULL && hwdata->image->pitches[0] != (width*bpp) ) {
   331 	if ( hwdata->image != NULL && hwdata->image->pitches[0] != (width*bpp) ) {
   332 		/* Ajust overlay width according to pitch */ 
   332 		/* Ajust overlay width according to pitch */ 
       
   333 		width = hwdata->image->pitches[0] / bpp;
   333 		XFree(hwdata->image);
   334 		XFree(hwdata->image);
   334 		width = hwdata->image->pitches[0] / bpp;
       
   335 		hwdata->image = SDL_NAME(XvShmCreateImage)(GFX_Display, xv_port, format,
   335 		hwdata->image = SDL_NAME(XvShmCreateImage)(GFX_Display, xv_port, format,
   336 							   0, width, height, yuvshm);
   336 							   0, width, height, yuvshm);
   337 	}
   337 	}
   338 #endif /* PITCH_WORKAROUND */
   338 #endif /* PITCH_WORKAROUND */
   339 	hwdata->yuv_use_mitshm = (hwdata->image != NULL);
   339 	hwdata->yuv_use_mitshm = (hwdata->image != NULL);