projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fixed SDL gradient renderer not drawing anything if top and bottom colors are the...
[supertux.git]
/
src
/
video
/
sdl
/
sdl_painter.cpp
diff --git
a/src/video/sdl/sdl_painter.cpp
b/src/video/sdl/sdl_painter.cpp
index
8074d2f
..
25b8843
100644
(file)
--- a/
src/video/sdl/sdl_painter.cpp
+++ b/
src/video/sdl/sdl_painter.cpp
@@
-145,6
+145,7
@@
SDLPainter::draw_gradient(SDL_Renderer* renderer, const DrawingRequest& request)
fabsf(top.green - bottom.green)),
std::max(fabsf(top.blue - bottom.blue),
fabsf(top.alpha - bottom.alpha))) * 255);
+ n = std::max(n, 1);
for(int i = 0; i < n; ++i)
{
SDL_Rect rect;