Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove: Support for macOS before 10.9 #8025

wants to merge 4 commits into from


Copy link

@nielsmh nielsmh commented Feb 26, 2020

Remove all assumptions and code paths that are only relevant for builds intended to support macOS earlier than 10.9. This simplifies the Cocoa video driver a lot and makes it much easier to follow the code.

So far this is barely just smoke-tested on my own machine with macOS 10.13.

Copy link

@orudge orudge commented Feb 27, 2020

If we're dropping support for <10.9, the enable_osx_g5-related stuff can go too, since OS X hasn't run on PPC since 10.5.

Copy link

@glx22 glx22 commented Feb 29, 2020

If I correctly understand the following blocks can be removed too

typedef struct {
NSInteger majorVersion;
NSInteger minorVersion;
NSInteger patchVersion;
} OTTDOperatingSystemVersion;
#define NSOperatingSystemVersion OTTDOperatingSystemVersion

SInt32 systemVersion, version_major, version_minor, version_bugfix;
if (Gestalt(gestaltSystemVersion, &systemVersion) == noErr) {
if (systemVersion >= 0x1040) {
if (Gestalt(gestaltSystemVersionMajor, &version_major) == noErr) *return_major = (int)version_major;
if (Gestalt(gestaltSystemVersionMinor, &version_minor) == noErr) *return_minor = (int)version_minor;
if (Gestalt(gestaltSystemVersionBugFix, &version_bugfix) == noErr) *return_bugfix = (int)version_bugfix;
} else {
*return_major = (int)(GB(systemVersion, 12, 4) * 10 + GB(systemVersion, 8, 4));
*return_minor = (int)GB(systemVersion, 4, 4);
*return_bugfix = (int)GB(systemVersion, 0, 4);

That should remove the deprecated warnings.

And I think some other conditional stuff in this file can be removed too.

Copy link

@michicc michicc commented Feb 29, 2020

Unfortunately, the alternative to Gestalt was only introduced in 10.10 (see 10.9 has no official, non-deprecated system function.

Copy link
Contributor Author

@nielsmh nielsmh commented Apr 10, 2020

Closing in favour of #8078 - I don't see myself finishing or cleaning up this one any time soon.

@nielsmh nielsmh closed this Apr 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

4 participants