summaryrefslogtreecommitdiffstats
path: root/libvo/x11_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'libvo/x11_common.c')
-rw-r--r--libvo/x11_common.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libvo/x11_common.c b/libvo/x11_common.c
index 754e01365c..9bb8362d80 100644
--- a/libvo/x11_common.c
+++ b/libvo/x11_common.c
@@ -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;