summaryrefslogtreecommitdiffstats
path: root/progs
diff options
context:
space:
mode:
authorJesse Barnes <[email protected]>2010-01-04 13:13:57 -0500
committerJesse Barnes <[email protected]>2010-01-08 12:37:43 -0500
commit0269dc19b57b61d46b09fe2636ce430baa9383c3 (patch)
tree1e297734cd7b4630ec045b3155c56b52a034c2f6 /progs
parentf860aac0d8caff6623792c9da272af269e631ed9 (diff)
xdemos/glsync: check glXMakeCurrent return value
Since this program is used for testing, catching this case can be helpful.
Diffstat (limited to 'progs')
-rw-r--r--progs/xdemos/glsync.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/progs/xdemos/glsync.c b/progs/xdemos/glsync.c
index 0608f75534d..6108d991d01 100644
--- a/progs/xdemos/glsync.c
+++ b/progs/xdemos/glsync.c
@@ -120,6 +120,7 @@ int main(int argc, char *argv[])
int width = 500, height = 500, verbose = 0,
countonly = 0, interval = 1;
int c, i = 1;
+ int ret;
int attribs[] = { GLX_RGBA,
GLX_RED_SIZE, 1,
GLX_GREEN_SIZE, 1,
@@ -234,7 +235,10 @@ int main(int argc, char *argv[])
}
XMapWindow(disp, winGL);
- glXMakeCurrent(disp, winGL, context);
+ ret = glXMakeCurrent(disp, winGL, context);
+ if (ret) {
+ fprintf(stderr, "failed to make context current: %d\n", ret);
+ }
video_sync_get = glXGetProcAddress((unsigned char *)"glXGetVideoSyncSGI");
video_sync = glXGetProcAddress((unsigned char *)"glXWaitVideoSyncSGI");