mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2026-04-02 10:16:50 +02:00
Added background image color support. Changed "transparency" to "alpha" for layouts. Fixed code syling.
This commit is contained in:
@@ -230,8 +230,7 @@ SDL_Window* SDL::GetWindow()
|
||||
return Window;
|
||||
}
|
||||
|
||||
|
||||
bool SDL::RenderCopy(SDL_Texture *texture, unsigned char transparency, SDL_Rect *src, SDL_Rect *dest, double angle)
|
||||
bool SDL::RenderCopy(SDL_Texture *texture, unsigned char alpha, SDL_Rect *src, SDL_Rect *dest, double angle)
|
||||
{
|
||||
SDL_Rect rotateRect;
|
||||
rotateRect.w = dest->w;
|
||||
@@ -248,7 +247,7 @@ bool SDL::RenderCopy(SDL_Texture *texture, unsigned char transparency, SDL_Rect
|
||||
rotateRect.y = dest->y;
|
||||
}
|
||||
|
||||
SDL_SetTextureAlphaMod(texture, transparency);
|
||||
SDL_SetTextureAlphaMod(texture, alpha);
|
||||
SDL_RenderCopyEx(GetRenderer(), texture, src, &rotateRect, angle, NULL, SDL_FLIP_NONE);
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user