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

SDL_GetPlatform() returns "Mac OS X" for macOS. #4208

Closed
icculus opened this issue Mar 20, 2021 · 3 comments
Closed

SDL_GetPlatform() returns "Mac OS X" for macOS. #4208

icculus opened this issue Mar 20, 2021 · 3 comments

Comments

@icculus
Copy link
Collaborator

icculus commented Mar 20, 2021

I have no idea what sort of damage it would do to change this, but Apple changed the name of the platform from "Mac OS X" to "macOS" awhile ago, so we should probably change SDL_GetPlatform.

Presumably this is mostly used for logging, and actual logic that changes based on platform would use a preprocessor test, right??

@slime73
Copy link
Contributor

slime73 commented Mar 20, 2021

I can imagine some code written in languages that don't have platform preprocessing might use SDL_GetPlatform with actual logic.

Maybe there should be a new function just to get the platform's 'pretty name' for logging and display purposes? I don't know if that's worth it just to support the macOS name change though, or even if the language thing is a real problem with real code or just a hypothetical.

@icculus
Copy link
Collaborator Author

icculus commented Mar 20, 2021

I can imagine some code written in languages that don't have platform preprocessing might use SDL_GetPlatform with actual logic.

Yeah, that's a good point. We'll leave it alone for now.

@icculus icculus closed this as completed Mar 20, 2021
@flibitijibibo
Copy link
Collaborator

It's already closed, but for future reference: Can confirm that this would be pretty catastrophic for C# games - there's supposed to be an OSVersion in the C# standard but it intentionally does not work, so we have to use something like SDL_GetPlatform instead:

https://github.com/FNA-XNA/FNA/wiki/4:-FNA-and-Windows-API#environmentspecialfolder

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

No branches or pull requests

3 participants