mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-16 17:58:27 +00:00
Rename SDL_PIXELFORMAT_RGB888 and SDL_PIXELFORMAT_BGR888 to SDL_PIXELFORMAT_XRGB8888 and SDL_PIXELFORMAT_XBGR8888 for clarity
Fixes https://github.com/libsdl-org/SDL/issues/7903
This commit is contained in:
parent
d85e327c92
commit
e264bb5178
39 changed files with 400 additions and 390 deletions
|
@ -1258,14 +1258,14 @@ SDL_Texture *SDL_CreateTextureFromSurface(SDL_Renderer *renderer, SDL_Surface *s
|
|||
/* Try to have the best pixel format for the texture */
|
||||
/* No alpha, but a colorkey => promote to alpha */
|
||||
if (!fmt->Amask && SDL_SurfaceHasColorKey(surface)) {
|
||||
if (fmt->format == SDL_PIXELFORMAT_RGB888) {
|
||||
if (fmt->format == SDL_PIXELFORMAT_XRGB8888) {
|
||||
for (i = 0; i < (int)renderer->info.num_texture_formats; ++i) {
|
||||
if (renderer->info.texture_formats[i] == SDL_PIXELFORMAT_ARGB8888) {
|
||||
format = SDL_PIXELFORMAT_ARGB8888;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if (fmt->format == SDL_PIXELFORMAT_BGR888) {
|
||||
} else if (fmt->format == SDL_PIXELFORMAT_XBGR8888) {
|
||||
for (i = 0; i < (int)renderer->info.num_texture_formats; ++i) {
|
||||
if (renderer->info.texture_formats[i] == SDL_PIXELFORMAT_ABGR8888) {
|
||||
format = SDL_PIXELFORMAT_ABGR8888;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue