From 9fab467d58f627c704910a62f533c53e1674aee7 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 26 Mar 2014 00:43:38 +0100 Subject: ANDROID: Fix color key handling for 16bit mouse cursors. This should fix a issue similarly to bug #6108: "WII: Zak FM-TOWNS mouse cursor encased in blue box". --- backends/platform/android/gfx.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp index 92293493f0..23e29fbf85 100644 --- a/backends/platform/android/gfx.cpp +++ b/backends/platform/android/gfx.cpp @@ -759,8 +759,8 @@ void OSystem_Android::setMouseCursor(const void *buf, uint w, uint h, uint16 *d = (uint16 *)tmp; for (uint16 y = 0; y < h; ++y, d += pitch / 2 - w) for (uint16 x = 0; x < w; ++x, d++) - if (*s++ != (keycolor & 0xffff)) - *d |= 1; + if (*s++ == (keycolor & 0xffff)) + *d &= ~1; _mouse_texture->updateBuffer(0, 0, w, h, tmp, pitch); -- cgit v1.2.3 From 98867825bafee4580f646c74b10c269dc8ccb663 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 31 Mar 2014 18:59:36 +0200 Subject: ANDROID: Make transparent cursor pixels all 0 in 16bit cursor mode. Since the Android backend uses glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA) we need to make the transparent cursor pixels all 0 otherwise we might get artifacts from blending. --- backends/platform/android/gfx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backends/platform') diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp index 23e29fbf85..b71a98338b 100644 --- a/backends/platform/android/gfx.cpp +++ b/backends/platform/android/gfx.cpp @@ -760,7 +760,7 @@ void OSystem_Android::setMouseCursor(const void *buf, uint w, uint h, for (uint16 y = 0; y < h; ++y, d += pitch / 2 - w) for (uint16 x = 0; x < w; ++x, d++) if (*s++ == (keycolor & 0xffff)) - *d &= ~1; + *d = 0; _mouse_texture->updateBuffer(0, 0, w, h, tmp, pitch); -- cgit v1.2.3