2024-10-20 04:08:37 +00:00
|
|
|
#ifndef SHROOMS_VB_NATIVE_CONTROLLER_
|
|
|
|
#define SHROOMS_VB_NATIVE_CONTROLLER_
|
|
|
|
|
2024-10-23 23:01:54 +00:00
|
|
|
#include <SDL2/SDL.h>
|
2024-10-20 04:08:37 +00:00
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
uint16_t keys;
|
|
|
|
} ControllerState;
|
|
|
|
|
|
|
|
void ctrlInit(ControllerState *ctrl);
|
|
|
|
void ctrlKeyDown(ControllerState *ctrl, SDL_Keycode sym);
|
|
|
|
void ctrlKeyUp(ControllerState *ctrl, SDL_Keycode sym);
|
|
|
|
uint16_t ctrlKeys(ControllerState *ctrl);
|
|
|
|
|
|
|
|
#endif
|