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

Improve OSX bit rot #6695

Merged
merged 7 commits into from Apr 10, 2018
Merged

Improve OSX bit rot #6695

merged 7 commits into from Apr 10, 2018

Conversation

michicc
Copy link
Member

@michicc michicc commented Apr 8, 2018

OSX APIs are an ever-moving target. Update some uses in OTTD to hopefully improve compatibility with newer OSX versions.

@andythenorth
Copy link
Contributor

Compiles and runs for me on macOS 10.12.6. I'm not competent to review the changes. I could try and trigger specific issues that the commits address if that helps.


/* Get a file system reference for the font. */
FSRef ref;
/* Get font reference from name. */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation

CFStringRef name = CFStringCreateWithCString(kCFAllocatorDefault, font_name, kCFStringEncodingUTF8);

#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
if (MacOSVersionIsAtLeast(10, 6, 0)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent

CFRelease(fontURL);
}
if (descs != NULL) CFRelease(descs);
} else
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent

@michicc
Copy link
Member Author

michicc commented Apr 10, 2018

Now with less spaces :)

@michicc
Copy link
Member Author

michicc commented Apr 10, 2018

Exterminate all the spaces!

Copy link
Member

@TrueBrain TrueBrain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like any of us has a clue; sounds good to me! :D

Tnx for taking care of Mac OS X :)

@michicc michicc merged commit 6c3902a into OpenTTD:master Apr 10, 2018
@michicc michicc deleted the osx_api_refresh branch April 10, 2018 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants