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 - 2.0.9 fails to build against OS X 10.7 SDK
Summary: 2.0.9 fails to build against OS X 10.7 SDK
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.9
Hardware: All Mac OS X 10.7
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-08 06:27 UTC by Joshua Root
Modified: 2018-11-11 00:57 UTC (History)
3 users (show)

See Also:


Attachments
patch to limit use of CGColor property to 10.8+ (959 bytes, patch)
2018-11-08 06:27 UTC, Joshua Root
Details | Diff
allocate Black constant CGColor directly (695 bytes, patch)
2018-11-09 17:43 UTC, Riccardo Mottola
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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