diff options
author | Dan Everton <dan@iocaine.org> | 2006-02-16 18:55:36 +0000 |
---|---|---|
committer | Dan Everton <dan@iocaine.org> | 2006-02-16 18:55:36 +0000 |
commit | 7c64631792f5bb3bd804ff5880808d275be89a4d (patch) | |
tree | 4210484ae858624f59ed6198b016bf83ac222215 /uisimulator/sdl/lcd-sdl.c | |
parent | aef9e85a325e3db284298de7b4bc25eff0b7ac62 (diff) | |
download | rockbox-7c64631792f5bb3bd804ff5880808d275be89a4d.tar.gz rockbox-7c64631792f5bb3bd804ff5880808d275be89a4d.zip |
Actually fix the palette issue.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8705 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator/sdl/lcd-sdl.c')
-rw-r--r-- | uisimulator/sdl/lcd-sdl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/uisimulator/sdl/lcd-sdl.c b/uisimulator/sdl/lcd-sdl.c index 4a0962dbec..3327dd8350 100644 --- a/uisimulator/sdl/lcd-sdl.c +++ b/uisimulator/sdl/lcd-sdl.c | |||
@@ -73,9 +73,9 @@ void sdl_set_gradient(SDL_Surface *surface, SDL_Color *start, SDL_Color *end, in | |||
73 | SDL_Color palette[steps]; | 73 | SDL_Color palette[steps]; |
74 | 74 | ||
75 | for (i = 0; i < steps; i++) { | 75 | for (i = 0; i < steps; i++) { |
76 | palette[i].r = start->r + (end->r - start->r) * i / steps; | 76 | palette[i].r = start->r + (end->r - start->r) * i / (steps - 1); |
77 | palette[i].g = start->g + (end->g - start->g) * i / steps; | 77 | palette[i].g = start->g + (end->g - start->g) * i / (steps - 1); |
78 | palette[i].b = start->b + (end->b - start->b) * i / steps; | 78 | palette[i].b = start->b + (end->b - start->b) * i / (steps - 1); |
79 | } | 79 | } |
80 | 80 | ||
81 | SDL_SetPalette(surface, SDL_LOGPAL|SDL_PHYSPAL, palette, 0, steps); | 81 | SDL_SetPalette(surface, SDL_LOGPAL|SDL_PHYSPAL, palette, 0, steps); |