Provides gamepad-support.
More...
Go to the source code of this file.
|
|
#define | KORE_GAMEPAD_MAX_COUNT 12 |
|
| KORE_FUNC void | kore_gamepad_set_connect_callback (void(*value)(int, void *), void *userdata) |
| | Sets the gamepad-connect-callback which is called when a gamepad is connected.
|
| KORE_FUNC void | kore_gamepad_set_disconnect_callback (void(*value)(int, void *), void *userdata) |
| | Sets the gamepad-disconnect-callback which is called when a gamepad is disconnected.
|
| KORE_FUNC void | kore_gamepad_set_axis_callback (void(*value)(int, int, float, void *), void *userdata) |
| | Sets the gamepad-axis-callback which is called with data about changing gamepad-sticks.
|
| KORE_FUNC void | kore_gamepad_set_button_callback (void(*value)(int, int, float, void *), void *userdata) |
| | Sets the gamepad-button-callback which is called with data about changing gamepad-buttons.
|
| KORE_FUNC const char * | kore_gamepad_vendor (int gamepad) |
| | Returns a vendor-name for a gamepad.
|
| KORE_FUNC const char * | kore_gamepad_product_name (int gamepad) |
| | Returns a name for a gamepad.
|
| KORE_FUNC bool | kore_gamepad_connected (int gamepad) |
| | Checks whether a gamepad is connected.
|
| KORE_FUNC void | kore_gamepad_rumble (int gamepad, float left, float right) |
| | Rumbles a gamepad. Careful here because it might just fall off your table.
|
Provides gamepad-support.
◆ kore_gamepad_connected()
| KORE_FUNC bool kore_gamepad_connected |
( |
int | gamepad | ) |
|
Checks whether a gamepad is connected.
- Parameters
-
| gamepad | The index of the gamepad which's connection will be checked |
- Returns
- Whether a gamepad is connected for the gamepad-index
◆ kore_gamepad_product_name()
| KORE_FUNC const char * kore_gamepad_product_name |
( |
int | gamepad | ) |
|
Returns a name for a gamepad.
- Parameters
-
| gamepad | The index of the gamepad for which to receive the name |
- Returns
- The gamepad's name
◆ kore_gamepad_rumble()
| KORE_FUNC void kore_gamepad_rumble |
( |
int | gamepad, |
|
|
float | left, |
|
|
float | right ) |
Rumbles a gamepad. Careful here because it might just fall off your table.
- Parameters
-
| gamepad | The index of the gamepad to rumble |
| left | Rumble-strength for the left motor between 0 and 1 |
| right | Rumble-strength for the right motor between 0 and 1 |
◆ kore_gamepad_set_axis_callback()
| KORE_FUNC void kore_gamepad_set_axis_callback |
( |
void(* | value )(int, int, float, void *), |
|
|
void * | userdata ) |
Sets the gamepad-axis-callback which is called with data about changing gamepad-sticks.
- Parameters
-
| value | The callback |
| userdata | Userdata you will receive back as the 4th callback parameter |
◆ kore_gamepad_set_button_callback()
| KORE_FUNC void kore_gamepad_set_button_callback |
( |
void(* | value )(int, int, float, void *), |
|
|
void * | userdata ) |
Sets the gamepad-button-callback which is called with data about changing gamepad-buttons.
- Parameters
-
| value | The callback |
| userdata | Userdata you will receive back as the 4th callback parameter |
◆ kore_gamepad_set_connect_callback()
| KORE_FUNC void kore_gamepad_set_connect_callback |
( |
void(* | value )(int, void *), |
|
|
void * | userdata ) |
Sets the gamepad-connect-callback which is called when a gamepad is connected.
- Parameters
-
| value | The callback |
| userdata | Userdata you will receive back as the 2nd callback parameter |
◆ kore_gamepad_set_disconnect_callback()
| KORE_FUNC void kore_gamepad_set_disconnect_callback |
( |
void(* | value )(int, void *), |
|
|
void * | userdata ) |
Sets the gamepad-disconnect-callback which is called when a gamepad is disconnected.
- Parameters
-
| value | The callback |
| userdata | Userdata you will receive back as the 2nd callback parameter |
◆ kore_gamepad_vendor()
| KORE_FUNC const char * kore_gamepad_vendor |
( |
int | gamepad | ) |
|
Returns a vendor-name for a gamepad.
- Parameters
-
| gamepad | The index of the gamepad for which to receive the vendor-name |
- Returns
- The vendor-name