aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authordhewg2011-03-24 18:54:49 +0100
committerdhewg2011-03-24 18:56:59 +0100
commite6080087c8453b5a0345bf62b2cd3809e46f7591 (patch)
tree31eb963f41326371baf417034983775dd6c8a12a /backends
parent397fd31a17f007a610aa7b673170983414efb5d5 (diff)
downloadscummvm-rg350-e6080087c8453b5a0345bf62b2cd3809e46f7591.tar.gz
scummvm-rg350-e6080087c8453b5a0345bf62b2cd3809e46f7591.tar.bz2
scummvm-rg350-e6080087c8453b5a0345bf62b2cd3809e46f7591.zip
ANDROID: Fix cursor's keycolor
Don't wipe the RGB bits, fixes wrong colors on BASS cursors
Diffstat (limited to 'backends')
-rw-r--r--backends/platform/android/gfx.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp
index e32e2095bc..bbd09ad20a 100644
--- a/backends/platform/android/gfx.cpp
+++ b/backends/platform/android/gfx.cpp
@@ -710,7 +710,9 @@ void OSystem_Android::setMouseCursor(const byte *buf, uint w, uint h,
WRITE_UINT16(p, READ_UINT16(p) | 1);
_mouse_keycolor = keycolor;
- WRITE_UINT16(_mouse_texture_palette->palette() + keycolor * 2, 0);
+
+ p = _mouse_texture_palette->palette() + _mouse_keycolor * 2;
+ WRITE_UINT16(p, READ_UINT16(p) & ~1);
}
if (w == 0 || h == 0)
@@ -761,7 +763,8 @@ void OSystem_Android::setCursorPaletteInternal(const byte *colors,
for (uint i = 0; i < num; ++i, colors += 3, p += 2)
WRITE_UINT16(p, pf.RGBToColor(colors[0], colors[1], colors[2]));
- WRITE_UINT16(_mouse_texture_palette->palette() + _mouse_keycolor * 2, 0);
+ p = _mouse_texture_palette->palette() + _mouse_keycolor * 2;
+ WRITE_UINT16(p, READ_UINT16(p) & ~1);
}
void OSystem_Android::setCursorPalette(const byte *colors,
@@ -804,7 +807,8 @@ void OSystem_Android::disableCursorPalette(bool disable) {
WRITE_UINT16(dst, pf_dst.RGBToColor(r, g, b));
}
- WRITE_UINT16(_mouse_texture_palette->palette() + _mouse_keycolor * 2, 0);
+ byte *p = _mouse_texture_palette->palette() + _mouse_keycolor * 2;
+ WRITE_UINT16(p, READ_UINT16(p) & ~1);
}
_use_mouse_palette = !disable;