diff --git a/32blit-sdl/Input.cpp b/32blit-sdl/Input.cpp index e9592b1ed..179391fef 100644 --- a/32blit-sdl/Input.cpp +++ b/32blit-sdl/Input.cpp @@ -208,8 +208,10 @@ void Input::_add_controller(SDL_GameController* gc) { // welcome rumble to test if it can rumble auto can_rumble = SDL_GameControllerRumble(gc, 0xFFFF, 0xFFFF, 200); +#if SDL_VERSION_ATLEAST(2, 0, 14) // enable accelerometer if present SDL_GameControllerSetSensorEnabled(gc, SDL_SENSOR_ACCEL, SDL_TRUE); +#endif GameController gcs = {gc, can_rumble == 0}; game_controllers.push_back(gcs);