summaryrefslogtreecommitdiffstats
path: root/uisimulator
diff options
context:
space:
mode:
authorDan Everton <dan@iocaine.org>2006-02-16 18:55:36 +0000
committerDan Everton <dan@iocaine.org>2006-02-16 18:55:36 +0000
commit7c64631792f5bb3bd804ff5880808d275be89a4d (patch)
tree4210484ae858624f59ed6198b016bf83ac222215 /uisimulator
parentaef9e85a325e3db284298de7b4bc25eff0b7ac62 (diff)
downloadrockbox-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')
-rw-r--r--uisimulator/sdl/lcd-sdl.c6
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
SDL_Color palette[steps];
for (i = 0; i < steps; i++) {
- palette[i].r = start->r + (end->r - start->r) * i / steps;
- palette[i].g = start->g + (end->g - start->g) * i / steps;
- palette[i].b = start->b + (end->b - start->b) * i / steps;
+ palette[i].r = start->r + (end->r - start->r) * i / (steps - 1);
+ palette[i].g = start->g + (end->g - start->g) * i / (steps - 1);
+ palette[i].b = start->b + (end->b - start->b) * i / (steps - 1);
}
SDL_SetPalette(surface, SDL_LOGPAL|SDL_PHYSPAL, palette, 0, steps);