Applying these changes to external code doesn't actually improve anything, and within the context of the other Get* functions for renderers and surfaces, these stand out as outliers, so I'm going to back this change out.
This commit is contained in:
Sam Lantinga 2024-07-17 09:40:25 -07:00
parent b3df46e4bc
commit 5f5e91eab6
12 changed files with 102 additions and 67 deletions

View file

@ -402,8 +402,9 @@ static void testBlendModeOperation(TestRenderOperation op, int mode, SDL_PixelFo
return;
}
if (SDL_ISPIXELFORMAT_ALPHA(dst_format)) {
SDL_BlendMode blendMode = SDL_GetTextureBlendMode(dst);
SDLTest_AssertCheck(blendMode != SDL_BLENDMODE_INVALID, "Verify result from SDL_GetTextureBlendMode(), expected: !SDL_BLENDMODE_INVALID, got: 0x%" SDL_PRIx32, blendMode);
SDL_BlendMode blendMode = SDL_BLENDMODE_NONE;
ret = SDL_GetTextureBlendMode(dst, &blendMode);
SDLTest_AssertCheck(ret == 0, "Verify result from SDL_GetTextureBlendMode(), expected: 0, got: %i", ret);
SDLTest_AssertCheck(blendMode == SDL_BLENDMODE_BLEND, "Verify alpha texture blend mode, expected %d, got %" SDL_PRIu32, SDL_BLENDMODE_BLEND, blendMode);
}