FFI Wrapping Help
- Posted by Icy_Viking 3 months ago
- 445 views
Hello all,
I am wondering how you would wrap this with the FFI library.
typedef struct SDL_GameControllerButtonBind { SDL_GameControllerBindType bindType; union { int button; int axis; struct { int hat; int hat_mask; } hat; } value; } SDL_GameControllerButtonBind;
I know with unions you can't exactly wrap them as you would with a normal struct.
My idea is
export constant SDL_GAMECONTROLLERBUTTONID = define_c_type({ C_INT --button C_INT --axis C_POINTER --for struct C_INT --hat C_INT --hat_mask })