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:
@@ -327,7 +327,7 @@ BWindowScreen::SetColorList(rgb_color *list, int32 firstIndex, int32 lastIndex)
|
|||||||
if (!fActivateState) {
|
if (!fActivateState) {
|
||||||
// If we aren't active, we just change our local palette
|
// If we aren't active, we just change our local palette
|
||||||
for (int32 x = firstIndex; x <= lastIndex; x++) {
|
for (int32 x = firstIndex; x <= lastIndex; x++) {
|
||||||
fPalette[x] = list[x];
|
fPalette[x] = list[x - firstIndex];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
uint8 colors[3 * 256];
|
uint8 colors[3 * 256];
|
||||||
@@ -335,12 +335,12 @@ BWindowScreen::SetColorList(rgb_color *list, int32 firstIndex, int32 lastIndex)
|
|||||||
int32 j = 0;
|
int32 j = 0;
|
||||||
|
|
||||||
for (int32 x = firstIndex; x <= lastIndex; x++) {
|
for (int32 x = firstIndex; x <= lastIndex; x++) {
|
||||||
fPalette[x] = list[x];
|
fPalette[x] = list[x - firstIndex];
|
||||||
// update our local palette as well
|
// update our local palette as well
|
||||||
|
|
||||||
colors[j++] = list[x].red;
|
colors[j++] = fPalette[x].red;
|
||||||
colors[j++] = list[x].green;
|
colors[j++] = fPalette[x].green;
|
||||||
colors[j++] = list[x].blue;
|
colors[j++] = fPalette[x].blue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fAddonImage >= 0) {
|
if (fAddonImage >= 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user