mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-20 14:25:40 +00:00
Added SDL_BLENDMODE_BLEND_PREMULTIPLIED and SDL_BLENDMODE_ADD_PREMULTIPLIED
Fixes https://github.com/libsdl-org/SDL/issues/2485
This commit is contained in:
@@ -312,9 +312,15 @@ int main(int argc, char *argv[])
|
||||
} else if (SDL_strcasecmp(argv[i + 1], "blend") == 0) {
|
||||
blendMode = SDL_BLENDMODE_BLEND;
|
||||
consumed = 2;
|
||||
} else if (SDL_strcasecmp(argv[i + 1], "blend_premultiplied") == 0) {
|
||||
blendMode = SDL_BLENDMODE_BLEND_PREMULTIPLIED;
|
||||
consumed = 2;
|
||||
} else if (SDL_strcasecmp(argv[i + 1], "add") == 0) {
|
||||
blendMode = SDL_BLENDMODE_ADD;
|
||||
consumed = 2;
|
||||
} else if (SDL_strcasecmp(argv[i + 1], "add_premultiplied") == 0) {
|
||||
blendMode = SDL_BLENDMODE_ADD_PREMULTIPLIED;
|
||||
consumed = 2;
|
||||
} else if (SDL_strcasecmp(argv[i + 1], "mod") == 0) {
|
||||
blendMode = SDL_BLENDMODE_MOD;
|
||||
consumed = 2;
|
||||
@@ -338,7 +344,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
if (consumed < 0) {
|
||||
static const char *options[] = { "[--blend none|blend|add|mod|mul]", "[--cyclecolor]", "[--cyclealpha]", "[count]", NULL };
|
||||
static const char *options[] = { "[--blend none|blend|blend_premultiplied|add|add_premultiplied|mod|mul]", "[--cyclecolor]", "[--cyclealpha]", "[count]", NULL };
|
||||
SDLTest_CommonLogUsage(state, argv[0], options);
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user