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

get_preferred_locales #111

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

get_preferred_locales #111

wants to merge 1 commit into from

Conversation

sanette
Copy link
Contributor

@sanette sanette commented Mar 14, 2025

Implements (issue #110)

https://wiki.libsdl.org/SDL2/SDL_GetPreferredLocales

Here is what it does on my machine:

# let l = Sdl.get_preferred_locales ();;
val l : Sdl.locale list Sdl.result =
  Ok
   [{Tsdl.Sdl.language = "fr"; country = Some "FR"};
    {Tsdl.Sdl.language = "fr"; country = None}]

I hope the code is OK, but I could not do much testing apart from the above.
I tried to take care of string memory management, but I did not check the Error case

@sanette
Copy link
Contributor Author

sanette commented Mar 14, 2025

to be complete one should also add the SDL_LOCALECHANGED event

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