Skip to content

Commit

Permalink
sdl/gamecontroller: define SDL_SensorType enum to fix build on older …
Browse files Browse the repository at this point in the history
…SDL2 such as version 2.0.8

Signed-off-by: Lilis Iskandar <[email protected]>
  • Loading branch information
veeableful committed Jun 15, 2022
1 parent 93a4b56 commit eaaee51
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sdl/gamecontroller.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ static char* SDL_GameControllerMappingForIndex(int mapping_index)
#pragma message("SDL_GameControllerMappingForDeviceIndex is not supported before SDL 2.0.9")
#endif
typedef enum
{
SDL_SENSOR_INVALID = -1,
SDL_SENSOR_UNKNOWN,
SDL_SENSOR_ACCEL,
SDL_SENSOR_GYRO
} SDL_SensorType;
static int SDL_GameControllerGetPlayerIndex(SDL_GameController *gamecontroller)
{
return -1;
Expand Down

0 comments on commit eaaee51

Please sign in to comment.