diff --git a/src/sdl/rect.cpp b/src/sdl/rect.cpp index 109d912b8de1..a51a2bcfeefe 100644 --- a/src/sdl/rect.cpp +++ b/src/sdl/rect.cpp @@ -112,15 +112,15 @@ void draw_solid_tinted_rectangle(int x, int y, int w, int h, #if SDL_VERSION_ATLEAST(2,0,0) -void fill_rect(SDL_Renderer *rnd, SDL_Rect *rect, Uint8 r, Uint8 g, Uint8 b, - Uint8 a) +void fill_rect(SDL_Renderer *rnd, const SDL_Rect *rect, Uint8 r, Uint8 g, + Uint8 b, Uint8 a) { SDL_SetRenderDrawColor(rnd, r, g, b, a); SDL_RenderFillRect(rnd, rect); } -void draw_rect(SDL_Renderer *rnd, SDL_Rect *rect, Uint8 r, Uint8 g, Uint8 b, - Uint8 a) +void draw_rect(SDL_Renderer *rnd, const SDL_Rect *rect, Uint8 r, Uint8 g, + Uint8 b, Uint8 a) { SDL_SetRenderDrawColor(rnd, r, g, b, a); SDL_RenderDrawRect(rnd, rect); diff --git a/src/sdl/rect.hpp b/src/sdl/rect.hpp index 913ac10c7c80..b3db68fd1551 100644 --- a/src/sdl/rect.hpp +++ b/src/sdl/rect.hpp @@ -142,10 +142,10 @@ inline void fill_rect(surface& dst, SDL_Rect* dst_rect, const Uint32 color) } #if SDL_VERSION_ATLEAST(2,0,0) -void fill_rect(SDL_Renderer &rnd, const SDL_Rect *rect, Uint8 r, Uint8 g, +void fill_rect(SDL_Renderer *rnd, const SDL_Rect *rect, Uint8 r, Uint8 g, Uint8 b, Uint8 a); -void draw_rect(SDL_Renderer &rnd, const SDL_Rect *rect, Uint8 r, Uint8 g, +void draw_rect(SDL_Renderer *rnd, const SDL_Rect *rect, Uint8 r, Uint8 g, Uint8 b, Uint8 a); #endif } // namespace sdl