Add controller rumble support.

This commit is contained in:
MINICOM\mrb11 2019-02-11 21:39:55 -08:00
commit 7b0596d9df
4 changed files with 81 additions and 17 deletions

View file

@ -8,6 +8,8 @@
struct GamepadState {
SDL_GameController* controller;
SDL_JoystickID jsId;
SDL_Haptic* haptic;
int hapticEffectId;
short index;
short buttons;
@ -43,6 +45,8 @@ public:
void handleJoystickArrivalEvent(SDL_JoyDeviceEvent* event);
void rumble(unsigned short controllerNumber, unsigned short lowFreqMotor, unsigned short highFreqMotor);
void handleTouchFingerEvent(SDL_TouchFingerEvent* event);
int getAttachedGamepadMask();