mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-08-21 05:53:12 -07:00
Add Touch Tracking Functions to Controller State
This commit is contained in:
parent
cd3d700df8
commit
7d4cbccfbf
2 changed files with 53 additions and 0 deletions
|
@ -85,6 +85,15 @@ typedef struct chiaki_controller_state_t
|
|||
|
||||
CHIAKI_EXPORT void chiaki_controller_state_set_idle(ChiakiControllerState *state);
|
||||
|
||||
/**
|
||||
* @return A non-negative newly allocated touch id allocated or -1 if there are no slots left
|
||||
*/
|
||||
CHIAKI_EXPORT int8_t chiaki_controller_state_start_touch(ChiakiControllerState *state, uint16_t x, uint16_t y);
|
||||
|
||||
CHIAKI_EXPORT void chiaki_controller_state_stop_touch(ChiakiControllerState *state, uint8_t id);
|
||||
|
||||
CHIAKI_EXPORT void chiaki_controller_state_set_touch_pos(ChiakiControllerState *state, uint8_t id, uint16_t x, uint16_t y);
|
||||
|
||||
static inline bool chiaki_controller_state_equals(ChiakiControllerState *a, ChiakiControllerState *b)
|
||||
{
|
||||
if(!(a->buttons == b->buttons
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue