1
1
Fork 0
mirror of https://github.com/QB64Official/qb64.git synced 2024-09-16 03:54:01 +00:00
qb64/internal/c/parts/input/game_controller/download/gamepad_1.4.0_pre1_source
Galleon 3928325615 Primarily implements gamepad support (via _DEVICES, STICK/STRIG)
Corrects dependency detection bug in prev update which rendered _SCREENIMAGE unusable
Implements new command _FPS which limits the maximum hardware fps (primarily for throttling SUB _GL) [default is 60]
Usage example:
        _FPS 100
2015-01-18 04:20:57 -08:00
..
msvc Primarily implements gamepad support (via _DEVICES, STICK/STRIG) 2015-01-18 04:20:57 -08:00
resources Primarily implements gamepad support (via _DEVICES, STICK/STRIG) 2015-01-18 04:20:57 -08:00
source Primarily implements gamepad support (via _DEVICES, STICK/STRIG) 2015-01-18 04:20:57 -08:00
Changes.txt Primarily implements gamepad support (via _DEVICES, STICK/STRIG) 2015-01-18 04:20:57 -08:00
License.txt Primarily implements gamepad support (via _DEVICES, STICK/STRIG) 2015-01-18 04:20:57 -08:00
Makefile Primarily implements gamepad support (via _DEVICES, STICK/STRIG) 2015-01-18 04:20:57 -08:00
ReadMe.txt Primarily implements gamepad support (via _DEVICES, STICK/STRIG) 2015-01-18 04:20:57 -08:00
version Primarily implements gamepad support (via _DEVICES, STICK/STRIG) 2015-01-18 04:20:57 -08:00

Gamepad provides a low-level interface for USB game controller input. Each element on an attached game controller is mapped to zero or more buttons and zero or more axes. Buttons are binary controls; axes are continuous values ranging from -1.0f to 1.0f. The presence and ordering of elements depends on the platform and driver.

Typical usage: Register a callback to notify you when a new device is attached with Gamepad_deviceAttachFunc(), then call Gamepad_init() and Gamepad_detectDevices(). Your callback will be called once per connected game controller. Also register callbacks for button and axis events with Gamepad_buttonDownFunc(), Gamepad_buttonUpFunc(), and Gamepad_axisMoveFunc(). Call Gamepad_processEvents() every frame, and Gamepad_detectDevices() occasionally to be notified of new devices that were plugged in after your Gamepad_init() call. If you're interested in knowing when a device was disconnected, you can call Gamepad_deviceRemoveFunc() get be notified of it.

See Gamepad.h for more details.