Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9610f635 authored by Jack Palevich's avatar Jack Palevich
Browse files

Fix extraMath state variable.

Change-Id: Iba76d3e4e3bab0b993d176755f588201c8a967cd
parent 81d7aeb8
Loading
Loading
Loading
Loading
+11 −7
Original line number Diff line number Diff line
@@ -384,14 +384,18 @@ void doTest(uint32_t w, uint32_t h) {
    int texCount;
    int extraMath;
    int testSubState;
    if ( testState < 5 * 2) {
       texCount = 0; // Only 10 tests for texCout 0
       extraMath = testState / 2;
       testSubState = testState % 2;
    const int extraMathCount = 5;
    const int texCount0SubTestCount = 2;
    const int texCountNSubTestCount = 8;

    if ( testState < extraMathCount * texCount0SubTestCount) {
       texCount = 0; // Only 10 tests for texCount 0
       extraMath = (testState / texCount0SubTestCount) % extraMathCount;
       testSubState = testState % texCount0SubTestCount;
    } else {
       texCount = 1 + (testState - 10) / (5 * 8);
       extraMath = testState / 8;
       testSubState = testState % 8;
       texCount = 1 + (testState - extraMathCount * texCount0SubTestCount) / (extraMathCount * texCountNSubTestCount);
       extraMath = (testState / texCountNSubTestCount) % extraMathCount;
       testSubState = testState % texCountNSubTestCount;
    }
    if (texCount >= 3) {
       LOGI("done\n");