changeset 1447:e82fbd67ae60

better local display connection patch by Adam Tla/lka atlka@pg.gda.pl
author arpi
date Mon, 06 Aug 2001 00:22:44 +0000
parents a49fd85fc431
children e795527de16a
files libvo/x11_common.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/x11_common.c	Mon Aug 06 00:22:13 2001 +0000
+++ b/libvo/x11_common.c	Mon Aug 06 00:22:44 2001 +0000
@@ -91,7 +91,11 @@
    }
    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;