From c8a972ee33cca5ae6ccede7473d2aaab4c7e3062 Mon Sep 17 00:00:00 2001 From: raster Date: Thu, 1 Oct 2009 09:04:02 +0000 Subject: [PATCH] add loops arg git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/expedite@42836 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/bin/main.c | 7 +++++++ src/bin/main.h | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/bin/main.c b/src/bin/main.c index 58590ab..7bed636 100644 --- a/src/bin/main.c +++ b/src/bin/main.c @@ -9,6 +9,7 @@ struct _Evas_Object_Image_Preload Evas *evas = NULL; int win_w = 720, win_h = 420; +int loops = LOOPS; static char *datadir = NULL; static int go = 1; @@ -1172,6 +1173,11 @@ _profile_parse(int argc, char **argv) return 0; } } + else if ((!strcmp(argv[i], "-c")) && (i < (argc - 1))) + { + i++; + loops = atoi(argv[i]); + } } return 1; } @@ -1271,6 +1277,7 @@ _engine_args(int argc, char **argv) "Options:\n" " -datadir path/to/data\n" " -a (autorun all tests)\n" + " -c NUM (loop count for test)\n" " -l (list tests)\n" " -t TEST-NUM\n" " -e ENGINE\n" diff --git a/src/bin/main.h b/src/bin/main.h index 60d3579..e5f9bfb 100644 --- a/src/bin/main.h +++ b/src/bin/main.h @@ -83,6 +83,7 @@ extern "C" extern Evas *evas; extern int win_w, win_h; +extern int loops; void srnd(void); unsigned int rnd(void); @@ -103,7 +104,7 @@ int engine_abort(void); } #define FPS_STD(x) \ - if ((f >= LOOPS) && (!done)) \ + if ((f >= loops) && (!done)) \ { \ double fps; \ fps = (double)f / t; \ -- 2.7.4