Mac and Linux SDL2 binary snapshots
Edward Rudd
2021-06-15 dec7875a6e23212021e4d9080330a42832dfe02a
source/src/video/cocoa/SDL_cocoashape.m
@@ -18,7 +18,6 @@
     misrepresented as being the original software.
  3. This notice may not be removed or altered from any source distribution.
*/
#include "../../SDL_internal.h"
#if SDL_VIDEO_DRIVER_COCOA
@@ -27,7 +26,6 @@
#include "SDL_shape.h"
#include "SDL_cocoashape.h"
#include "../SDL_sysvideo.h"
#include "SDL_assert.h"
SDL_WindowShaper*
Cocoa_CreateShaper(SDL_Window* window)
@@ -37,14 +35,14 @@
    [windata->nswindow setStyleMask:NSWindowStyleMaskBorderless];
    SDL_WindowShaper* result = result = malloc(sizeof(SDL_WindowShaper));
    SDL_WindowShaper* result = (SDL_WindowShaper *)SDL_malloc(sizeof(SDL_WindowShaper));
    result->window = window;
    result->mode.mode = ShapeModeDefault;
    result->mode.parameters.binarizationCutoff = 1;
    result->userx = result->usery = 0;
    window->shaper = result;
    SDL_ShapeData* data = malloc(sizeof(SDL_ShapeData));
    SDL_ShapeData* data = (SDL_ShapeData *)SDL_malloc(sizeof(SDL_ShapeData));
    result->driverdata = data;
    data->context = [windata->nswindow graphicsContext];
    data->saved = SDL_FALSE;
@@ -88,10 +86,10 @@
    [NSGraphicsContext setCurrentContext:data->context];
    [[NSColor clearColor] set];
    NSRectFill([[windata->nswindow contentView] frame]);
    NSRectFill([windata->sdlContentView frame]);
    data->shape = SDL_CalculateShapeTree(*shape_mode,shape);
    closure.view = [windata->nswindow contentView];
    closure.view = windata->sdlContentView;
    closure.path = [NSBezierPath bezierPath];
    closure.window = shaper->window;
    SDL_TraverseShapeTree(data->shape,&ConvertRects,&closure);