quartz: Fix cursor transparency. SDL-1.2
authorRyan C. Gordon <icculus@icculus.org>
Sat, 03 Aug 2019 16:27:46 -0400
branchSDL-1.2
changeset 129920cfa2cc751eb
parent 12989 f4dccc2744a2
child 12993 e7ee29d04712
quartz: Fix cursor transparency.

This patch originally came from:

https://github.com/kanjitalk755/SDL/commit/0296d5e601a5deb5ce2f540a8eafd64dd22dbe69

Fixes Bugzilla #4076.
src/video/quartz/SDL_QuartzWM.m
     1.1 --- a/src/video/quartz/SDL_QuartzWM.m	Sat Aug 03 12:47:10 2019 +0300
     1.2 +++ b/src/video/quartz/SDL_QuartzWM.m	Sat Aug 03 16:27:46 2019 -0400
     1.3 @@ -55,7 +55,7 @@
     1.4      
     1.5      /* copy data and mask, extending the mask to all black pixels because the inversion effect doesn't work with Cocoa's alpha-blended cursors */
     1.6      for (i = 0; i < (w+7)/8*h; i++) {
     1.7 -        planes[0][i] = data[i] ^ 0xFF;
     1.8 +        planes[0][i] = ~data[i] & mask[i];
     1.9          planes[1][i] = mask[i] | data[i];
    1.10      }
    1.11