better local display connection patch by Adam Tla/lka atlka@pg.gda.pl

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1448 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2001-08-06 00:22:44 +00:00
parent 65a1786c01
commit de316dee37
1 changed files with 5 additions and 1 deletions

View File

@ -91,7 +91,11 @@ int vo_init( void )
}
XDestroyImage( mXImage );
// XCloseDisplay( mDisplay );
#warning Better local display detection method is needed.
/* slightly improved local display detection AST */
if ( strncmp(mDisplayName, "unix:", 5) == 0)
mDisplayName += 4;
else if ( strncmp(mDisplayName, "localhost:", 10) == 0)
mDisplayName += 9;
if (*mDisplayName==':') mLocalDisplay=1; else mLocalDisplay=0;
printf("vo: X11 running at %dx%d depth: %d (\"%s\" => %s display)\n",vo_screenwidth,vo_screenheight,vo_depthonscreen,mDisplayName,mLocalDisplay?"local":"remote");
return 1;