Browse Source

testcolorspace: show the blend color when it's incorrect

Also added an additional PQ blend color case
Sam Lantinga 1 month ago
parent
commit
413ac5084d
1 changed files with 6 additions and 4 deletions
  1. 6 4
      test/testcolorspace.c

+ 6 - 4
test/testcolorspace.c

@@ -454,10 +454,11 @@ static void RenderBlendDrawing(void)
                (cr.r == 191 && cr.g == 162 && cr.b == 82)) {
         DrawText(x, y, "Correct blend color, blending in sRGB space");
     } else if ((cr.r == 214 && cr.g == 156 && cr.b == 113) ||
-               (cr.r == 215 && cr.g == 155 && cr.b == 113)) {
+               (cr.r == 215 && cr.g == 155 && cr.b == 113) ||
+               (cr.r == 215 && cr.g == 154 && cr.b == 112)) {
         DrawText(x, y, "Correct blend color, blending in PQ space");
     } else {
-        DrawText(x, y, "Incorrect blend color, unknown reason");
+        DrawText(x, y, "Incorrect blend color (%d,%d,%d), unknown reason", cr.r, cr.g, cr.b);
     }
     y += TEXT_LINE_ADVANCE;
 }
@@ -516,10 +517,11 @@ static void RenderBlendTexture(void)
                (cr.r == 191 && cr.g == 162 && cr.b == 82)) {
         DrawText(x, y, "Correct blend color, blending in sRGB space");
     } else if ((cr.r == 214 && cr.g == 156 && cr.b == 113) ||
-               (cr.r == 215 && cr.g == 155 && cr.b == 113)) {
+               (cr.r == 215 && cr.g == 155 && cr.b == 113) ||
+               (cr.r == 215 && cr.g == 154 && cr.b == 112)) {
         DrawText(x, y, "Correct blend color, blending in PQ space");
     } else {
-        DrawText(x, y, "Incorrect blend color, unknown reason");
+        DrawText(x, y, "Incorrect blend color (%d,%d,%d), unknown reason", cr.r, cr.g, cr.b);
     }
     y += TEXT_LINE_ADVANCE;