MainLoop,Options: Add --run-forever command-line option.
diff --git a/src/options.cpp b/src/options.cpp
index 3b9be6e..fe89c0a 100644
--- a/src/options.cpp
+++ b/src/options.cpp
@@ -40,6 +40,7 @@
bool Options::show_debug = false;
bool Options::show_help = false;
bool Options::reuse_context = false;
+bool Options::run_forever = false;
static struct option long_options[] = {
{"benchmark", 1, 0, 0},
@@ -47,6 +48,7 @@
{"validate", 0, 0, 0},
{"no-swap-buffers", 0, 0, 0},
{"reuse-context", 0, 0, 0},
+ {"run-forever", 0, 0, 0},
{"size", 1, 0, 0},
{"list-scenes", 0, 0, 0},
{"show-all-options", 0, 0, 0},
@@ -101,6 +103,8 @@
" and their options\n"
" --show-all-options Show all scene option values used for benchmarks\n"
" (only explicitly set options are shown by default)\n"
+ " --run-forever Run indefinitely, looping from the last benchmark\n"
+ " back to the first\n"
" -d, --debug Display debug messages\n"
" -h, --help Display help\n");
}
@@ -139,6 +143,8 @@
Options::list_scenes = true;
else if (!strcmp(optname, "show-all-options"))
Options::show_all_options = true;
+ else if (!strcmp(optname, "run-forever"))
+ Options::run_forever = true;
else if (c == 'd' || !strcmp(optname, "debug"))
Options::show_debug = true;
else if (c == 'h' || !strcmp(optname, "help"))