summaryrefslogtreecommitdiff
path: root/apps/plugins/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lib')
-rw-r--r--apps/plugins/lib/playergfx.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/plugins/lib/playergfx.c b/apps/plugins/lib/playergfx.c
index d7e1ce26e8..b6e7ccfc64 100644
--- a/apps/plugins/lib/playergfx.c
+++ b/apps/plugins/lib/playergfx.c
@@ -152,7 +152,10 @@ static void fgblock(unsigned char *address, unsigned mask, unsigned bits)
static void solidblock(unsigned char *address, unsigned mask, unsigned bits)
{
- *address = (*address & ~mask) | (bits & mask);
+ unsigned data = *(char *)address;
+
+ bits ^= data;
+ *address = data ^ (bits & mask);
}
static void flipinvblock(unsigned char *address, unsigned mask, unsigned bits)
@@ -172,7 +175,10 @@ static void fginvblock(unsigned char *address, unsigned mask, unsigned bits)
static void solidinvblock(unsigned char *address, unsigned mask, unsigned bits)
{
- *address = (*address & ~mask) | (~bits & mask);
+ unsigned data = *(char *)address;
+
+ bits = ~bits ^ data;
+ *address = data ^ (bits & mask);
}
lcd_blockfunc_type* pgfx_blockfuncs[8] = {