BindBC / bindbc-sdl

Static & dynamic D bindings to SDL and the SDL_* libraries, compatible with BetterC, @nogc, and nothrow.
Boost Software License 1.0
86 stars 24 forks source link

Fixing a broken lib.bindSymbol on android #30

Closed DannyArends closed 3 years ago

DannyArends commented 3 years ago

In the android binding the function SDL_AndroidGetInternalStorageState was requested, but internal storage has not state (always connected), the function is called SDL_AndroidGetExternalStorageState

DannyArends commented 3 years ago

Hey @mdparker,

Sorry to ping you about this, but I just wanted to give a bit more explanation for this pull request:

Loading BindBC-sdl on Android ends up with a badlibrary (1) being returned from loadSDL(). This is due bindbc-sdl trying to load a binding to the non-existent "SDL_AndroidGetInternalStorageState" function.

This pull request fixes the call by pointing it to the right function "SDL_AndroidGetExternalStorageState", see the SDL docs

Sorry to ping you about this, I'm a big fan of the BindBC bindings and want to thanks for the time you invested to create them.

Danny

ps. Tracking this down was painful, took me some time to setup android compatible debugging in the loadSDL() function.

mdparker commented 3 years ago

Actually, thank you for pinging me. I totally missed this PR. And thanks for tracking it down and fixing it.

mdparker commented 3 years ago

Live in version 0.21.4.