Mercurial > sdl-ios-xcode
diff src/video/x11/SDL_x11video.c @ 1299:2bf9dda618e5
Corrects dynamic X11 code on Tru64 systems.
Fixes Bugzilla #87.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Mon, 30 Jan 2006 18:21:44 +0000 |
parents | d2c6881935be |
children | c9b51268668f |
line wrap: on
line diff
--- a/src/video/x11/SDL_x11video.c Mon Jan 30 14:27:56 2006 +0000 +++ b/src/video/x11/SDL_x11video.c Mon Jan 30 18:21:44 2006 +0000 @@ -436,6 +436,20 @@ local_X11 = 0; } SDL_Display = pXOpenDisplay(display); +#if defined(__osf__) && defined(X11_DYNAMIC) + /* On Tru64 if linking without -lX11, it fails and you get following message. + * Xlib: connection to ":0.0" refused by server + * Xlib: XDM authorization key matches an existing client! + * + * It succeeds if retrying 1 second later + * or if running xhost +localhost on shell. + * + */ + if ( SDL_Display == NULL ) { + SDL_Delay(1000); + SDL_Display = pXOpenDisplay(display); + } +#endif if ( SDL_Display == NULL ) { SDL_SetError("Couldn't open X11 display"); return(-1);