changed SH_MEM to HAVE_SHM according to configure

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3004 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
alex 2001-11-19 15:51:17 +00:00
parent 59ff0c9779
commit 2d2c807b6d
1 changed files with 5 additions and 7 deletions

View File

@ -76,9 +76,7 @@ static int X_already_started=0;
static int Flip_Flag; static int Flip_Flag;
#define SH_MEM #ifdef HAVE_SHM
#ifdef SH_MEM
#include <sys/ipc.h> #include <sys/ipc.h>
#include <sys/shm.h> #include <sys/shm.h>
@ -314,7 +312,7 @@ static uint32_t init( uint32_t width,uint32_t height,uint32_t d_width,uint32_t d
#endif #endif
} }
#ifdef SH_MEM #ifdef HAVE_SHM
if ( mLocalDisplay && XShmQueryExtension( mDisplay ) ) Shmem_Flag=1; if ( mLocalDisplay && XShmQueryExtension( mDisplay ) ) Shmem_Flag=1;
else else
{ {
@ -385,7 +383,7 @@ static uint32_t init( uint32_t width,uint32_t height,uint32_t d_width,uint32_t d
myximage=XGetImage( mDisplay,mywindow,0,0, myximage=XGetImage( mDisplay,mywindow,0,0,
image_width,image_height,AllPlanes,ZPixmap ); image_width,image_height,AllPlanes,ZPixmap );
ImageData=myximage->data; ImageData=myximage->data;
#ifdef SH_MEM #ifdef HAVE_SHM
} }
DeInstallXErrorHandler(); DeInstallXErrorHandler();
@ -437,7 +435,7 @@ static const vo_info_t* get_info( void )
static void Terminate_Display_Process( void ) static void Terminate_Display_Process( void )
{ {
getchar(); /* wait for enter to remove window */ getchar(); /* wait for enter to remove window */
#ifdef SH_MEM #ifdef HAVE_SHM
if ( Shmem_Flag ) if ( Shmem_Flag )
{ {
XShmDetach( mDisplay,&Shminfo[0] ); XShmDetach( mDisplay,&Shminfo[0] );
@ -453,7 +451,7 @@ static void Terminate_Display_Process( void )
static void Display_Image( XImage *myximage,uint8_t *ImageData ) static void Display_Image( XImage *myximage,uint8_t *ImageData )
{ {
#ifdef DISP #ifdef DISP
#ifdef SH_MEM #ifdef HAVE_SHM
if ( Shmem_Flag ) if ( Shmem_Flag )
{ {
XShmPutImage( mDisplay,mywindow,mygc,myximage, XShmPutImage( mDisplay,mywindow,mygc,myximage,