mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-25 01:45:27 +00:00
Removed redundant SDL_GetColorKey() call. (thanks Sylvain!)
This commit is contained in:
parent
7f9854b9b2
commit
60afec79bf
|
@ -649,7 +649,7 @@ SDL_CreateTextureFromSurface(SDL_Renderer * renderer, SDL_Surface * surface)
|
||||||
|
|
||||||
/* See what the best texture format is */
|
/* See what the best texture format is */
|
||||||
fmt = surface->format;
|
fmt = surface->format;
|
||||||
if (fmt->Amask || (SDL_HasColorKey(surface) && SDL_GetColorKey(surface, NULL) == 0)) {
|
if (fmt->Amask || SDL_HasColorKey(surface)) {
|
||||||
needAlpha = SDL_TRUE;
|
needAlpha = SDL_TRUE;
|
||||||
} else {
|
} else {
|
||||||
needAlpha = SDL_FALSE;
|
needAlpha = SDL_FALSE;
|
||||||
|
@ -708,7 +708,7 @@ SDL_CreateTextureFromSurface(SDL_Renderer * renderer, SDL_Surface * surface)
|
||||||
SDL_GetSurfaceAlphaMod(surface, &a);
|
SDL_GetSurfaceAlphaMod(surface, &a);
|
||||||
SDL_SetTextureAlphaMod(texture, a);
|
SDL_SetTextureAlphaMod(texture, a);
|
||||||
|
|
||||||
if (SDL_GetColorKey(surface, NULL) == 0) {
|
if (SDL_HasColorKey(surface)) {
|
||||||
/* We converted to a texture with alpha format */
|
/* We converted to a texture with alpha format */
|
||||||
SDL_SetTextureBlendMode(texture, SDL_BLENDMODE_BLEND);
|
SDL_SetTextureBlendMode(texture, SDL_BLENDMODE_BLEND);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue