[Branch,~glmark2-dev/glmark2/trunk] Rev 181: Android: Handle the Scene...

My dashboard
Submitter alexandros.frantzis@linaro.org
Subject [Branch,~glmark2-dev/glmark2/trunk] Rev 181: Android: Handle the SceneDefaultOptions special scene properly.
Date Jan. 13, 2012, 3:07 p.m.
List thread <20120113150714.16017.94718.launchpad@ackee.canonical.com>
Project glmark2
State Accepted
Last updated Jan. 13, 2012, 3:07 p.m.
Headers show

Comments

noreply@launchpad.net - Jan. 13, 2012, 3:07 p.m.
------------------------------------------------------------
revno: 181
committer: Alexandros Frantzis <alexandros.frantzis@linaro.org>
branch nick: trunk
timestamp: Fri 2012-01-13 16:05:54 +0200
message:
  Android: Handle the SceneDefaultOptions special scene properly.
  
  The SceneDefaultOptions is distinguishable by its empty name.
modified:
  src/android.cpp


--
lp:glmark2
https://code.launchpad.net/~glmark2-dev/glmark2/trunk

You are subscribed to branch lp:glmark2.
To unsubscribe from this branch go to https://code.launchpad.net/~glmark2-dev/glmark2/trunk/+edit-subscription

Patch

=== modified file 'src/android.cpp'
--- src/android.cpp	2012-01-13 14:03:23 +0000
+++ src/android.cpp	2012-01-13 14:05:54 +0000
@@ -100,10 +100,15 @@ 
     static unsigned int benchmarks_run = 0;
 
     if (!scene) {
-        if (bench_iter != g_benchmarks.end()) {
+        /* Find the next normal scene */
+        while (bench_iter != g_benchmarks.end()) {
             scene = &(*bench_iter)->setup_scene();
+            if (!scene->name().empty())
+                break;
+            bench_iter++;
         }
-        else {
+
+        if (bench_iter == g_benchmarks.end()) {
             if (benchmarks_run)
                 score /= benchmarks_run;
             Log::info("glmark2 Score: %u\n", score);