From 09278da69837dd3d9451a6c250cef5af1de72a47 Mon Sep 17 00:00:00 2001 From: "Lukas F. Hartmann" <lukas@mntre.com> Date: Wed, 29 Jun 2022 20:58:35 +0200 Subject: [PATCH] gfx: fix NEOR minterm, contributed by tom w. --- ZZ9000_proto.sdk/ZZ9000OS/src/gfx.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ZZ9000_proto.sdk/ZZ9000OS/src/gfx.h b/ZZ9000_proto.sdk/ZZ9000OS/src/gfx.h index e11c3ab..0936646 100644 --- a/ZZ9000_proto.sdk/ZZ9000OS/src/gfx.h +++ b/ZZ9000_proto.sdk/ZZ9000OS/src/gfx.h @@ -390,7 +390,7 @@ enum gfx_minterm_modes { s &= d; \ SET_FG_PIXEL8_MASK(0); break; \ case MINTERM_NEOR: \ - d ^= (s & mask); break; \ + d ^= ~(s & mask); break; \ case MINTERM_DST: /* This one does nothing. */ \ return; break; \ case MINTERM_NOTONLYSRC: \ @@ -466,9 +466,9 @@ enum gfx_minterm_modes { case MINTERM_NEOR: \ switch (color_format) { \ case MNTVA_COLOR_16BIT565: \ - ((uint16_t *)d)[x] ^= (s & color_mask); break; \ + ((uint16_t *)d)[x] ^= ~(s & color_mask); break; \ case MNTVA_COLOR_32BIT: \ - d[x] ^= (s & color_mask); break; \ + d[x] ^= ~(s & color_mask); break; \ } break; \ case MINTERM_DST: /* This one does nothing. */ \ return; break; \ -- GitLab