testsprite: only use transparent alpha on transparent windows
Fixes https://github.com/libsdl-org/SDL/issues/14105
This commit is contained in:
@@ -119,7 +119,11 @@ static void MoveSprites(SDL_Renderer *renderer, SDL_Texture *sprite)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Draw a gray background */
|
/* Draw a gray background */
|
||||||
SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0x00 /* used with --transparent */);
|
if (SDL_GetWindowFlags(SDL_GetRenderWindow(renderer)) & SDL_WINDOW_TRANSPARENT) {
|
||||||
|
SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, SDL_ALPHA_TRANSPARENT);
|
||||||
|
} else {
|
||||||
|
SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, SDL_ALPHA_OPAQUE);
|
||||||
|
}
|
||||||
SDL_RenderClear(renderer);
|
SDL_RenderClear(renderer);
|
||||||
|
|
||||||
/* Test points */
|
/* Test points */
|
||||||
|
|||||||
Reference in New Issue
Block a user