mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-16 21:51:17 +00:00
SDL_HapticRumblePlay rumble for gamepad without SDL_HAPTIC_LEFTRIGHT support (#181)
This commit is contained in:
committed by
Cameron Gutman
parent
e5a8b49c93
commit
e32bc1a0a3
@@ -9,6 +9,7 @@ struct GamepadState {
|
||||
SDL_GameController* controller;
|
||||
SDL_JoystickID jsId;
|
||||
SDL_Haptic* haptic;
|
||||
int hapticMethod;
|
||||
int hapticEffectId;
|
||||
short index;
|
||||
|
||||
@@ -21,6 +22,13 @@ struct GamepadState {
|
||||
#define MAX_GAMEPADS 4
|
||||
#define MAX_FINGERS 2
|
||||
|
||||
#define GAMEPAD_HAPTIC_METHOD_NONE 0
|
||||
#define GAMEPAD_HAPTIC_METHOD_LEFTRIGHT 1
|
||||
#define GAMEPAD_HAPTIC_METHOD_SIMPLERUMBLE 2
|
||||
|
||||
#define GAMEPAD_HAPTIC_SIMPLE_HIFREQ_MOTOR_WEIGHT 0.33
|
||||
#define GAMEPAD_HAPTIC_SIMPLE_LOWFREQ_MOTOR_WEIGHT 0.8
|
||||
|
||||
class SdlInputHandler
|
||||
{
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user