aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorEugene Sandulenko2019-11-10 00:25:13 +0100
committerEugene Sandulenko2019-11-10 00:27:25 +0100
commit4952d1c760eec45add83cee0540f10b4799e91d7 (patch)
treea06e4e95772c051790328ae66dfaa4e128b854df /gui
parentd1fa1154fe5758fe48928062ff9b43d1bcfc7770 (diff)
downloadscummvm-rg350-4952d1c760eec45add83cee0540f10b4799e91d7.tar.gz
scummvm-rg350-4952d1c760eec45add83cee0540f10b4799e91d7.tar.bz2
scummvm-rg350-4952d1c760eec45add83cee0540f10b4799e91d7.zip
GUI: Fix colors in About. Now it works on Amiga
Diffstat (limited to 'gui')
-rw-r--r--gui/about.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/gui/about.cpp b/gui/about.cpp
index d6571c7671..eaafadba08 100644
--- a/gui/about.cpp
+++ b/gui/about.cpp
@@ -1380,7 +1380,10 @@ void EE::genSprites() {
pixels >>= 1;
- *((uint16 *)_sp[kSpB1 + s].getBasePtr(posx, posy)) = (uint16)palette[color + 8];
+ if (_back.format.bytesPerPixel == 2)
+ *((uint16 *)_sp[kSpB1 + s].getBasePtr(posx, posy)) = (uint16)palette[color + 8];
+ else if (_back.format.bytesPerPixel == 4)
+ *((uint32 *)_sp[kSpB1 + s].getBasePtr(posx, posy)) = palette[color + 8];
}
}
}
@@ -1403,7 +1406,10 @@ void EE::genSprites() {
if (x == 15)
pixels = *ptr;
- *((uint16 *)_sp[kSpL1 + s].getBasePtr(posx, y)) = (uint16)palette[color + 4 * (s / 3)];
+ if (_back.format.bytesPerPixel == 2)
+ *((uint16 *)_sp[kSpL1 + s].getBasePtr(posx, y)) = (uint16)palette[color + 4 * (s / 3)];
+ else if (_back.format.bytesPerPixel == 4)
+ *((uint32 *)_sp[kSpL1 + s].getBasePtr(posx, y)) = palette[color + 4 * (s / 3)];
}
}
}