diff options
| author | Drew DeVault <sir@cmpwn.com> | 2021-12-09 16:46:37 +0100 |
|---|---|---|
| committer | Drew DeVault <sir@cmpwn.com> | 2021-12-09 16:46:37 +0100 |
| commit | 81bac10cd7c26cf1ca1c0fcb9ee3dcccd7710f22 (patch) | |
| tree | 649b0c5e3977041def1245d61ada75036410f809 /sdl2/joystick.ha | |
| parent | timer: correct naming convention (diff) | |
| download | hare-chip8-81bac10cd7c26cf1ca1c0fcb9ee3dcccd7710f22.tar.gz | |
Initial gamecontroller support
Diffstat (limited to '')
| -rw-r--r-- | sdl2/joystick.ha | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sdl2/joystick.ha b/sdl2/joystick.ha new file mode 100644 index 0000000..c4f4c96 --- /dev/null +++ b/sdl2/joystick.ha @@ -0,0 +1,13 @@ +// TODO: Flesh me out + +// Minimum value for a joystick axis. +export def JOYSTICK_AXIS_MIN: i16 = -32768; + +// Minimum value for a joystick axis. +export def JOYSTICK_AXIS_MAX: i16 = 32767; + +// Count the number of joysticks attached to the system. +// +// Returns the number of attached joysticks on success or a negative error code +// on failure. +export @symbol("SDL_NumJoysticks") fn numjoysticks() int; |
