We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4368

Summary: 2.0.9 fails to build against OS X 10.7 SDK
Product: SDL Reporter: Joshua Root <josh+sdl>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: amaranth72, rm, sezeroz
Version: 2.0.9   
Hardware: All   
OS: Mac OS X 10.7   
Attachments: patch to limit use of CGColor property to 10.8+
allocate Black constant CGColor directly

Description Joshua Root 2018-11-08 06:27:09 UTC
Created attachment 3463 [details]
patch to limit use of CGColor property to 10.8+

SDL2-2.0.9/src/video/cocoa/SDL_cocoawindow.m:1178:53: error: property 'CGColor' not found on object of type 'NSColor *'
    self.layer.backgroundColor = NSColor.blackColor.CGColor;
                                                    ^

Fix seems pretty simple.
Comment 1 Riccardo Mottola 2018-11-09 17:43:31 UTC
I propose the new patch, which is valid for all systems, does not depend on a 10.8 specific function and is also faster because it uses a constant of CG instead of going through NS
Comment 2 Riccardo Mottola 2018-11-09 17:43:51 UTC
Created attachment 3482 [details]
allocate Black constant CGColor directly
Comment 3 Alex Szpakowski 2018-11-11 00:57:51 UTC
Thanks for the patch! It's been applied here: https://hg.libsdl.org/SDL/rev/5a95fbfd3617