src/video/quartz/SDL_QuartzWM.m
branchSDL-1.2
changeset 12992 0cfa2cc751eb
parent 6224 6f013dd0add1
equal deleted inserted replaced
12989:f4dccc2744a2 12992:0cfa2cc751eb
    53     if (imgrep == nil) goto outOfMemory;
    53     if (imgrep == nil) goto outOfMemory;
    54     [ imgrep getBitmapDataPlanes: planes ];
    54     [ imgrep getBitmapDataPlanes: planes ];
    55     
    55     
    56     /* copy data and mask, extending the mask to all black pixels because the inversion effect doesn't work with Cocoa's alpha-blended cursors */
    56     /* copy data and mask, extending the mask to all black pixels because the inversion effect doesn't work with Cocoa's alpha-blended cursors */
    57     for (i = 0; i < (w+7)/8*h; i++) {
    57     for (i = 0; i < (w+7)/8*h; i++) {
    58         planes[0][i] = data[i] ^ 0xFF;
    58         planes[0][i] = ~data[i] & mask[i];
    59         planes[1][i] = mask[i] | data[i];
    59         planes[1][i] = mask[i] | data[i];
    60     }
    60     }
    61 
    61 
    62     /* create image and cursor */
    62     /* create image and cursor */
    63     img = [ [ [ NSImage alloc ] initWithSize: NSMakeSize(w, h) ] autorelease ];
    63     img = [ [ [ NSImage alloc ] initWithSize: NSMakeSize(w, h) ] autorelease ];