SFML community forums
Help => Window => Topic started by: EvilSakray on March 18, 2012, 05:59:35 pm
-
Hello,
I'd like to know if SFML (1.6) offers any way of checking if DISPLAY environnement of execution shell is properly setted before trying opening a Window.
(env -u DISPLAY / env -i or any invalid value result in an instant segfault.)
Thanks :wink:
-
No, but since it's platform specific you can use platform specific code. Include <Xlib.h> and check whether XOpenDisplay returns NULL or a valid result.
-
Thanks, worked like a charm :wink: