When setting the palette, the passed array is 0 based, even if the first
index is not 0. Bruno, can you check if this fixes SoundPlay's colors? git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32241 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
166983b771
commit
bfb5eef88f
@ -327,7 +327,7 @@ BWindowScreen::SetColorList(rgb_color *list, int32 firstIndex, int32 lastIndex)
|
||||
if (!fActivateState) {
|
||||
// If we aren't active, we just change our local palette
|
||||
for (int32 x = firstIndex; x <= lastIndex; x++) {
|
||||
fPalette[x] = list[x];
|
||||
fPalette[x] = list[x - firstIndex];
|
||||
}
|
||||
} else {
|
||||
uint8 colors[3 * 256];
|
||||
@ -335,12 +335,12 @@ BWindowScreen::SetColorList(rgb_color *list, int32 firstIndex, int32 lastIndex)
|
||||
int32 j = 0;
|
||||
|
||||
for (int32 x = firstIndex; x <= lastIndex; x++) {
|
||||
fPalette[x] = list[x];
|
||||
fPalette[x] = list[x - firstIndex];
|
||||
// update our local palette as well
|
||||
|
||||
colors[j++] = list[x].red;
|
||||
colors[j++] = list[x].green;
|
||||
colors[j++] = list[x].blue;
|
||||
colors[j++] = fPalette[x].red;
|
||||
colors[j++] = fPalette[x].green;
|
||||
colors[j++] = fPalette[x].blue;
|
||||
}
|
||||
|
||||
if (fAddonImage >= 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user