diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2003-01-17 00:32:50 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2003-01-17 00:32:50 +0000 |
commit | 8830b0a941afbac21f6e95fe65ba93a14dfe7ad5 (patch) | |
tree | d18a35a46554543590af081da82744acd4123afe /src | |
parent | deb5fe3b68addb8098f319484575ccdb078ded18 (diff) |
Make miniglut exit() on error, like real glut.
Diffstat (limited to 'src')
-rw-r--r-- | src/glut/mini/window.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/glut/mini/window.c b/src/glut/mini/window.c index 1c56590fedd..a054ef82425 100644 --- a/src/glut/mini/window.c +++ b/src/glut/mini/window.c @@ -62,7 +62,7 @@ int APIENTRY glutCreateWindow (const char *title) dpy = XOpenDisplay(NULL); if (!dpy) { printf("Error: XOpenDisplay failed\n"); - return 1; + exit(1); } } @@ -79,7 +79,7 @@ int APIENTRY glutCreateWindow (const char *title) visinfo = glXChooseVisual( dpy, scrnum, attrib ); if (!visinfo) { printf("Error: couldn't get an RGB, Double-buffered visual\n"); - return 0; + exit(1); } } @@ -95,18 +95,18 @@ int APIENTRY glutCreateWindow (const char *title) visinfo->visual, mask, &attr ); if (!win) { printf("Error: XCreateWindow failed\n"); - return 0; + exit(1); } ctx = glXCreateContext( dpy, visinfo, NULL, True ); if (!ctx) { printf("Error: glXCreateContext failed\n"); - return 0; + exit(1); } if (!glXMakeCurrent( dpy, win, ctx )) { printf("Error: glXMakeCurrent failed\n"); - return 0; + exit(1); } XMapWindow( dpy, win ); |