summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorepoch <epoch@hacking.allowed.org>2017-02-02 00:12:58 -0600
committerepoch <epoch@hacking.allowed.org>2017-02-02 00:12:58 -0600
commit75ac7ceb90c98595bf0a6847619df52af7f2ef3f (patch)
treea60635a763eed7c88458379f5552927630686393
parentc943daf37d99471ecc1c820d4902832757acc1cd (diff)
downloadhackvr-75ac7ceb90c98595bf0a6847619df52af7f2ef3f.tar.gz
hackvr-75ac7ceb90c98595bf0a6847619df52af7f2ef3f.zip
made graphics_init exit instead of return 2 when it fails to open X display
-rw-r--r--src/graphics_x11.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/graphics_x11.c b/src/graphics_x11.c
index 9839169..b939673 100644
--- a/src/graphics_x11.c
+++ b/src/graphics_x11.c
@@ -281,7 +281,10 @@ int graphics_init() {
// Window root,child;//why do I have this?
// XColor toss;
printf("# Opening X Display... (%s)\n",getenv("DISPLAY"));
- if((x11_global.dpy = XOpenDisplay(0)) == NULL) return printf("# failure.\n"),2;
+ if((x11_global.dpy = XOpenDisplay(0)) == NULL) {
+ printf("# failure.\n");
+ exit(1);
+ }
else printf("# done.\n");
x11_global.color_map=DefaultColormap(x11_global.dpy, DefaultScreen(x11_global.dpy));
printf("# generating grays...\n");