summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2009-10-01 09:04:02 +0000
committerCarsten Haitzler <raster@rasterman.com>2009-10-01 09:04:02 +0000
commitb8fa0d949d64776112d26e0fd62cc64f80688150 (patch)
tree3d84b3ae9842d9310025e6ea44e3a9e9b3c58841
parent8644206b6e2247bd0d9c724ad91008a2d430ff7a (diff)
add loops arg
SVN revision: 42836
-rw-r--r--src/bin/main.c7
-rw-r--r--src/bin/main.h3
2 files changed, 9 insertions, 1 deletions
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
9 9
10Evas *evas = NULL; 10Evas *evas = NULL;
11int win_w = 720, win_h = 420; 11int win_w = 720, win_h = 420;
12int loops = LOOPS;
12 13
13static char *datadir = NULL; 14static char *datadir = NULL;
14static int go = 1; 15static int go = 1;
@@ -1172,6 +1173,11 @@ _profile_parse(int argc, char **argv)
1172 return 0; 1173 return 0;
1173 } 1174 }
1174 } 1175 }
1176 else if ((!strcmp(argv[i], "-c")) && (i < (argc - 1)))
1177 {
1178 i++;
1179 loops = atoi(argv[i]);
1180 }
1175 } 1181 }
1176 return 1; 1182 return 1;
1177} 1183}
@@ -1271,6 +1277,7 @@ _engine_args(int argc, char **argv)
1271 "Options:\n" 1277 "Options:\n"
1272 " -datadir path/to/data\n" 1278 " -datadir path/to/data\n"
1273 " -a (autorun all tests)\n" 1279 " -a (autorun all tests)\n"
1280 " -c NUM (loop count for test)\n"
1274 " -l (list tests)\n" 1281 " -l (list tests)\n"
1275 " -t TEST-NUM\n" 1282 " -t TEST-NUM\n"
1276 " -e ENGINE\n" 1283 " -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"
83 83
84extern Evas *evas; 84extern Evas *evas;
85extern int win_w, win_h; 85extern int win_w, win_h;
86extern int loops;
86 87
87void srnd(void); 88void srnd(void);
88unsigned int rnd(void); 89unsigned int rnd(void);
@@ -103,7 +104,7 @@ int engine_abort(void);
103 } 104 }
104 105
105#define FPS_STD(x) \ 106#define FPS_STD(x) \
106 if ((f >= LOOPS) && (!done)) \ 107 if ((f >= loops) && (!done)) \
107 { \ 108 { \
108 double fps; \ 109 double fps; \
109 fps = (double)f / t; \ 110 fps = (double)f / t; \