Skip to content

SDL2: compatibility fixes for macOS < 10.15 #11827

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

Merged
merged 3 commits into from
Jan 2, 2025

Conversation

jmroot
Copy link
Contributor

@jmroot jmroot commented Jan 2, 2025

Description

Several recent changes inadvertently broke SDL2 on various macOS versions older than 10.15. These changes restore compatibility.

With the kAudioChannelLayoutTag_* enum values, when on an OS version that doesn't support the correct layout, I'm not sure if it's better to error out as I'm currently doing, or to use a not quite right channel layout as in previous versions.

@sezero sezero requested review from icculus and slouken January 2, 2025 20:50
@slouken
Copy link
Collaborator

slouken commented Jan 2, 2025

In general this looks good. Once CI passes and you've done testing on new and old versions of macOS and iOS, can you create a PR for SDL3 as well?

@slouken slouken added this to the 2.x milestone Jan 2, 2025
@jmroot
Copy link
Contributor Author

jmroot commented Jan 2, 2025

In general this looks good. Once CI passes and you've done testing on new and old versions of macOS and iOS, can you create a PR for SDL3 as well?

Oh, I assumed SDL3 wouldn't be supporting macOS versions this old. Happy to make the PR if that's not the case.

There seems to be an issue with the NSInvocation stuff, can you by any chance spot my mistake?

@jmroot
Copy link
Contributor Author

jmroot commented Jan 2, 2025

OK, I think I got it.

@slouken
Copy link
Collaborator

slouken commented Jan 2, 2025

We're probably going to bump the minimum deployment target for macOS to 10.15 in SDL3, so anything here relevant for that version would be great.

@slouken
Copy link
Collaborator

slouken commented Jan 2, 2025

What versions of iOS and macOS have you tested building and running this code?

@jmroot
Copy link
Contributor Author

jmroot commented Jan 2, 2025

I'm unable to test on iOS. Lightly tested running on macOS 14.7.2, 10.8.5 and 10.7.5 so far. Successful builds on all major macOS versions from 10.7 through to 14.

@jmroot
Copy link
Contributor Author

jmroot commented Jan 2, 2025

We're probably going to bump the minimum deployment target for macOS to 10.15 in SDL3, so anything here relevant for that version would be great.

This is all only needed for <= 10.14.

@slouken slouken merged commit 6024c27 into libsdl-org:SDL2 Jan 2, 2025
38 checks passed
@slouken
Copy link
Collaborator

slouken commented Jan 2, 2025

Merged, thanks!

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.

2 participants