Skip to content

Commit

Permalink
Fixed SDL gradient renderer not drawing anything if top and bottom co…
Browse files Browse the repository at this point in the history
…lors are the same

Problem could be seen in "data/levels/world1/19 - Miyamoto Monument.stl"
  • Loading branch information
Grumbel committed Aug 12, 2014
1 parent b88dc6c commit 2d23465
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/video/sdl/sdl_painter.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 2d23465

Please sign in to comment.