From dec7875a6e23212021e4d9080330a42832dfe02a Mon Sep 17 00:00:00 2001
From: Edward Rudd <urkle@outoforder.cc>
Date: Tue, 15 Jun 2021 01:40:19 +0000
Subject: [PATCH] update SDL soruce to 2.0.14
---
source/src/video/cocoa/SDL_cocoashape.m | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/source/src/video/cocoa/SDL_cocoashape.m b/source/src/video/cocoa/SDL_cocoashape.m
index 8a43c11..f278c28 100644
--- a/source/src/video/cocoa/SDL_cocoashape.m
+++ b/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);
--
Gitblit v1.9.3