SDL: testprogram: add option to use SDL_BLENDMODE_MUL

From 4312abab696b38ca100bb9757f1944a108e9e01f Mon Sep 17 00:00:00 2001
From: Sylvain <[EMAIL REDACTED]>
Date: Wed, 15 Mar 2023 21:58:43 +0100
Subject: [PATCH] testprogram: add option to use SDL_BLENDMODE_MUL

---
 test/testdraw.c          | 5 ++++-
 test/testgeometry.c      | 5 ++++-
 test/testintersections.c | 5 ++++-
 test/testsprite.c        | 5 ++++-
 4 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/test/testdraw.c b/test/testdraw.c
index 833b1b5e7293..c5c1711d7c9b 100644
--- a/test/testdraw.c
+++ b/test/testdraw.c
@@ -251,6 +251,9 @@ int main(int argc, char *argv[])
                     } else if (SDL_strcasecmp(argv[i + 1], "mod") == 0) {
                         blendMode = SDL_BLENDMODE_MOD;
                         consumed = 2;
+                    } else if (SDL_strcasecmp(argv[i + 1], "mul") == 0) {
+                        blendMode = SDL_BLENDMODE_MUL;
+                        consumed = 2;
                     }
                 }
             } else if (SDL_strcasecmp(argv[i], "--cyclecolor") == 0) {
@@ -266,7 +269,7 @@ int main(int argc, char *argv[])
         }
         if (consumed < 0) {
             static const char *options[] = {
-                "[--blend none|blend|add|mod]",
+                "[--blend none|blend|add|mod|mul]",
                 "[--cyclecolor]",
                 "[--cyclealpha]",
                 "[num_objects]",
diff --git a/test/testgeometry.c b/test/testgeometry.c
index 6f1b60b80fb8..424abba288f5 100644
--- a/test/testgeometry.c
+++ b/test/testgeometry.c
@@ -196,6 +196,9 @@ int main(int argc, char *argv[])
                     } else if (SDL_strcasecmp(argv[i + 1], "mod") == 0) {
                         blendMode = SDL_BLENDMODE_MOD;
                         consumed = 2;
+                    } else if (SDL_strcasecmp(argv[i + 1], "mul") == 0) {
+                        blendMode = SDL_BLENDMODE_MUL;
+                        consumed = 2;
                     }
                 }
             } else if (SDL_strcasecmp(argv[i], "--use-texture") == 0) {
@@ -204,7 +207,7 @@ int main(int argc, char *argv[])
             }
         }
         if (consumed < 0) {
-            static const char *options[] = { "[--blend none|blend|add|mod]", "[--use-texture]", NULL };
+            static const char *options[] = { "[--blend none|blend|add|mod|mul]", "[--use-texture]", NULL };
             SDLTest_CommonLogUsage(state, argv[0], options);
             return 1;
         }
diff --git a/test/testintersections.c b/test/testintersections.c
index d5f53cb767c5..516c6a5e5497 100644
--- a/test/testintersections.c
+++ b/test/testintersections.c
@@ -317,6 +317,9 @@ int main(int argc, char *argv[])
                     } else if (SDL_strcasecmp(argv[i + 1], "mod") == 0) {
                         blendMode = SDL_BLENDMODE_MOD;
                         consumed = 2;
+                    } else if (SDL_strcasecmp(argv[i + 1], "mul") == 0) {
+                        blendMode = SDL_BLENDMODE_MUL;
+                        consumed = 2;
                     }
                 }
             } else if (SDL_strcasecmp(argv[i], "--cyclecolor") == 0) {
@@ -331,7 +334,7 @@ int main(int argc, char *argv[])
             }
         }
         if (consumed < 0) {
-            static const char *options[] = { "[--blend none|blend|add|mod]", "[--cyclecolor]", "[--cyclealpha]", NULL };
+            static const char *options[] = { "[--blend none|blend|add|mod|mul]", "[--cyclecolor]", "[--cyclealpha]", NULL };
             SDLTest_CommonLogUsage(state, argv[0], options);
             return 1;
         }
diff --git a/test/testsprite.c b/test/testsprite.c
index 175d81dc9aa2..d1cbac14ac4c 100644
--- a/test/testsprite.c
+++ b/test/testsprite.c
@@ -465,6 +465,9 @@ int main(int argc, char *argv[])
                     } else if (SDL_strcasecmp(argv[i + 1], "mod") == 0) {
                         blendMode = SDL_BLENDMODE_MOD;
                         consumed = 2;
+                    } else if (SDL_strcasecmp(argv[i + 1], "mul") == 0) {
+                        blendMode = SDL_BLENDMODE_MUL;
+                        consumed = 2;
                     } else if (SDL_strcasecmp(argv[i + 1], "sub") == 0) {
                         blendMode = SDL_ComposeCustomBlendMode(SDL_BLENDFACTOR_SRC_ALPHA, SDL_BLENDFACTOR_ONE, SDL_BLENDOPERATION_SUBTRACT, SDL_BLENDFACTOR_ZERO, SDL_BLENDFACTOR_ONE, SDL_BLENDOPERATION_SUBTRACT);
                         consumed = 2;
@@ -508,7 +511,7 @@ int main(int argc, char *argv[])
         }
         if (consumed < 0) {
             static const char *options[] = {
-                "[--blend none|blend|add|mod]",
+                "[--blend none|blend|add|mod|mul|sub]",
                 "[--cyclecolor]",
                 "[--cyclealpha]",
                 "[--iterations N]",