forked from len0rd/rockbox
Actually fix the palette issue.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8705 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
aef9e85a32
commit
7c64631792
1 changed files with 3 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue