diff options
author | Lassi Pulkkinen <lassi@pulk.fi> | 2024-10-31 03:11:21 +0200 |
---|---|---|
committer | Lassi Pulkkinen <lassi@pulk.fi> | 2024-10-31 03:51:35 +0200 |
commit | ae44478b30d890fe0fb04022f44d474dcdcc3f9d (patch) | |
tree | 5f462459ae4b47d22114eed717d1382d08cf4dfe /sdl2/joystick.ha |
Diffstat (limited to 'sdl2/joystick.ha')
-rw-r--r-- | sdl2/joystick.ha | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sdl2/joystick.ha b/sdl2/joystick.ha new file mode 100644 index 0000000..2234aff --- /dev/null +++ b/sdl2/joystick.ha @@ -0,0 +1,12 @@ +// TODO: Flesh me out + +// Minimum value for a joystick axis. +export def SDL_JOYSTICK_AXIS_MIN: i16 = -32768; + +// Minimum value for a joystick axis. +export def SDL_JOYSTICK_AXIS_MAX: i16 = 32767; + +@symbol("SDL_NumJoysticks") fn _SDL_NumJoysticks() int; + +// Returns the number of joysticks attached to the system. +export fn SDL_NumJoysticks() (int | error) = wrapint(_SDL_NumJoysticks()); |