From 4c04b64ad319bd47cae770247abbdb93a60ab4d4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Tue, 1 Feb 2011 19:35:41 +0000 Subject: [PATCH] Don't wait for a keypress by default. --- glretrace.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/glretrace.py b/glretrace.py index 3c4a956..f6a9fca 100644 --- a/glretrace.py +++ b/glretrace.py @@ -167,6 +167,7 @@ static enum { MODE_SNAPSHOT, MODE_COMPARE, } __mode = MODE_DISPLAY; +bool __wait = false; const char *__snapshot_prefix = ""; @@ -305,7 +306,7 @@ static void display(void) { " in " << timeInterval << " secs," " average of " << (__frame/timeInterval) << " fps\n"; - if (__mode == MODE_DISPLAY) { + if (__wait) { glutDisplayFunc(&display_noop); glutIdleFunc(NULL); } else { @@ -360,6 +361,8 @@ int main(int argc, char **argv) __mode = MODE_SNAPSHOT; } else if (!strcmp(arg, "-v")) { ++verbosity; + } else if (!strcmp(arg, "-w")) { + __wait = true; } else { std::cerr << "error: unknown option " << arg << "\n"; usage(); -- 2.7.4