Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LINUX] Add forcefeedback (aka rumble, vibration) support for SDL3 input #223

Open
cinnamonmatexfce opened this issue Jan 31, 2025 · 0 comments

Comments

@cinnamonmatexfce
Copy link

cinnamonmatexfce commented Jan 31, 2025

With the recent ArchLinux update to version 3 of SDL I'm no more able to get force feedback working.

Using (or not) SDL_JOYSTICK_HIDAPI=0 makes no difference, regarding force feedback:

$ SDL_JOYSTICK_HIDAPI=0 supermodel ROM.zip 
Supermodel: A Sega Model 3 Arcade Emulator (Version 0.3a-WIP)
Copyright 2003-2024 by The Supermodel Team
GPU info: 4.5.0 NVIDIA 565.77 (core profile)

Error: Unable to obtain haptic interface for joystick Sony Interactive Entertainment Wireless Controller. Force feedback will be disabled for this joystick.
  • SDL_JOYSTICK_HIDAPI=0:
    • Joysticks:
      1: Sony Interactive Entertainment Wireless Controller
  • SDL_JOYSTICK_HIDAPI=1:
    • Joysticks:
      1: PS4 Controller

Supermodel: A Sega Model 3 Arcade Emulator (Version 0.3a-WIP)
Copyright 2003-2024 by The Supermodel Team
GPU info: 4.5.0 NVIDIA 565.77 (core profile)

Error: Unable to obtain haptic interface for joystick Sony Interactive Entertainment Wireless Controller. Force feedback will be disabled for this joystick.
Input Assignments
-----------------

Common Controls:
 P1 Start = JOY1_BUTTON10
 P2 Start = KEY_2,JOY2_BUTTON9
 P1 Coin = JOY1_BUTTON9
 P2 Coin = KEY_4,JOY2_BUTTON10
 Service A = KEY_H
 Service B = KEY_K
 Test A = KEY_J
 Test B = KEY_L
4-Way Joysticks:
 P1 Joystick Up = JOY1_POV1_UP
 P1 Joystick Down = JOY1_POV1_DOWN
 P1 Joystick Left = JOY1_POV1_LEFT
 P1 Joystick Right = JOY1_POV1_RIGHT
 P2 Joystick Up = JOY2_UP
 P2 Joystick Down = JOY2_DOWN
 P2 Joystick Left = JOY2_LEFT
 P2 Joystick Right = JOY2_RIGHT
Fighting Game Buttons:
 P1 Punch = KEY_A,JOY1_BUTTON1
 P1 Kick = KEY_S,JOY1_BUTTON2
 P1 Guard = KEY_D,JOY1_BUTTON3
 P1 Escape = KEY_F,JOY1_BUTTON4
 P2 Punch = JOY2_BUTTON1
 P2 Kick = JOY2_BUTTON2
 P2 Guard = JOY2_BUTTON3
 P2 Escape = JOY2_BUTTON4
Spikeout Buttons:
 Shift = KEY_A,JOY1_BUTTON1
 Beat = KEY_S,JOY1_BUTTON2
 Charge = KEY_D,JOY1_BUTTON3
 Jump = KEY_F,JOY1_BUTTON4
Virtua Striker Buttons:
 P1 Short Pass = KEY_A,JOY1_BUTTON1
 P1 Long Pass = KEY_S,JOY1_BUTTON2
 P1 Shoot = KEY_D,JOY1_BUTTON3
 P2 Short Pass = JOY2_BUTTON1
 P2 Long Pass = JOY2_BUTTON2
 P2 Shoot = JOY2_BUTTON3
Racing Game Steering Controls:
 Steer Left = JOY1_XAXIS_NEG
 Steer Right = JOY1_XAXIS_POS
 Full Steering = JOY1_XAXIS
 Accelerator Pedal = JOY1_RZAXIS_POS
 Brake Pedal/Front Brake = JOY1_ZAXIS_POS
 Shift Up = KEY_Y
 Shift Down = KEY_H
Racing Game Gear 4-Way Shift:
 Shift 1 = JOY1_BUTTON1
 Shift 2 = JOY1_BUTTON2
 Shift 3 = JOY1_BUTTON3
 Shift 4 = JOY1_BUTTON4
 Shift Neutral = KEY_T
Racing Game 4 VR View Buttons:
 VR1 = KEY_A,JOY1_BUTTON1
 VR2 = KEY_S,JOY1_BUTTON2
 VR3 = KEY_D,JOY1_BUTTON3
 VR4 = KEY_F,JOY1_BUTTON4
Racing Game View Change:
 View Change = JOY1_BUTTON6
Racing Game Handbrake:
 Hand Brake = JOY1_BUTTON5
Harley Davidson Controls:
 Rear Brake = KEY_S,JOY1_BUTTON2
 Music Selection = KEY_D,JOY1_BUTTON3
Virtual On Controls:
 Macro Turn Left = KEY_Q,JOY1_RXAXIS_NEG
 Macro Turn Right = KEY_W,JOY1_RXAXIS_POS
 Macro Forward = KEY_UP,JOY1_YAXIS_NEG
 Macro Reverse = KEY_DOWN,JOY1_YAXIS_POS
 Macro Strafe Left = KEY_LEFT,JOY1_XAXIS_NEG
 Macro Strafe Right = KEY_RIGHT,JOY1_XAXIS_POS
 Macro Jump = KEY_E,JOY1_BUTTON1
 Macro Crouch = KEY_R,JOY1_BUTTON2
 Left Joystick Left = NONE
 Right Joystick Left = NONE
 Left Joystick Right = NONE
 Right Joystick Right = NONE
 Left Joystick Up = NONE
 Right Joystick Up = NONE
 Left Joystick Down = NONE
 Right Joystick Down = NONE
 Left Shot Trigger = KEY_A,JOY1_BUTTON5
 Right Shot Trigger = KEY_S,JOY1_BUTTON6
 Left Turbo = KEY_Z,JOY1_BUTTON7
 Right Turbo = KEY_X,JOY1_BUTTON8
Analog Joystick:
 Analog Left = JOY1_XAXIS_NEG
 Analog Right = JOY1_XAXIS_POS
 Analog Up = JOY1_YAXIS_NEG
 Analog Down = JOY1_YAXIS_POS
 Analog X-Axis = JOY_XAXIS,MOUSE_XAXIS
 Analog Y-Axis = JOY_YAXIS,MOUSE_YAXIS
 Trigger Button 1 = KEY_A,JOY_BUTTON1,MOUSE_LEFT_BUTTON
 Trigger Button 2 = KEY_D,JOY_BUTTON2
 Event Button 1 = KEY_S,JOY_BUTTON2,MOUSE_RIGHT_BUTTON
 Event Button 2 = NONE
Light Guns:
 P1 Gun Left = KEY_LEFT
 P1 Gun Right = KEY_RIGHT
 P1 Gun Up = KEY_UP
 P1 Gun Down = KEY_DOWN
 P1 Gun X-Axis = MOUSE_XAXIS,JOY1_XAXIS
 P1 Gun Y-Axis = MOUSE_YAXIS,JOY1_YAXIS
 P1 Trigger = KEY_A,JOY1_BUTTON1,MOUSE_LEFT_BUTTON
 P1 Point Off-screen = KEY_S,JOY1_BUTTON2,MOUSE_RIGHT_BUTTON
 P2 Gun Left = NONE
 P2 Gun Right = NONE
 P2 Gun Up = NONE
 P2 Gun Down = NONE
 P2 Gun X-Axis = JOY2_XAXIS
 P2 Gun Y-Axis = JOY2_YAXIS
 P2 Trigger = JOY2_BUTTON1
 P2 Point Off-screen = JOY2_BUTTON2
Analog Guns:
 P1 Analog Gun Left = KEY_LEFT
 P1 Analog Gun Right = KEY_RIGHT
 P1 Analog Gun Up = KEY_UP
 P1 Analog Gun Down = KEY_DOWN
 P1 Analog Gun X-Axis = MOUSE_XAXIS,JOY1_XAXIS
 P1 Analog Gun Y-Axis = MOUSE_YAXIS,JOY1_YAXIS
 P1 Analog Gun Left Trigger = KEY_A,JOY1_BUTTON1,MOUSE_LEFT_BUTTON
 P1 Analog Gun Right Trigger = KEY_S,JOY1_BUTTON2,MOUSE_RIGHT_BUTTON
 P2 Analog Gun Left = NONE
 P2 Analog Gun Right = NONE
 P2 Analog Gun Up = NONE
 P2 Analog Gun Down = NONE
 P2 Analog Gun X-Axis = NONE
 P2 Analog Gun Y-Axis = NONE
 P2 Analog Gun Left Trigger = NONE
 P2 Analog Gun Right Trigger = NONE
Ski Controls:
 Ski Champ Left = KEY_LEFT
 Ski Champ Right = KEY_RIGHT
 Ski Champ Up = KEY_UP
 Ski Champ Down = KEY_DOWN
 Ski Champ X-Axis = JOY1_XAXIS
 Ski Champ Y-Axis = JOY1_YAXIS
 Ski Champ Poll Left = KEY_A,JOY1_BUTTON1
 Ski Champ Poll Right = KEY_S,JOY1_BUTTON2
 Ski Champ Select 1 = KEY_Q,JOY1_BUTTON3
 Ski Champ Select 2 = KEY_W,JOY1_BUTTON4
 Ski Champ Select 3 = KEY_E,JOY1_BUTTON5
Magical Truck Controls:
 P1 Magical Lever Up = KEY_UP
 P1 Magical Lever Down = KEY_DOWN
 P2 Magical Lever Up = NONE
 P2 Magical Lever Down = NONE
 P1 Magical Lever = JOY1_YAXIS
 P2 Magical Lever = JOY2_YAXIS
 P1 Magical Pedal = KEY_A,JOY1_BUTTON1
 P2 Magical Pedal = KEY_S,JOY2_BUTTON1
Fishing Controls:
 Rod Left = KEY_LEFT
 Rod Right = KEY_RIGHT
 Rod Up = KEY_UP
 Rod Down = KEY_DOWN
 Stick Left = KEY_A
 Stick Right = KEY_D
 Stick Up = KEY_W
 Stick Down = KEY_S
 Rod X-Axis = JOY1_XAXIS
 Rod Y-Axis = JOY1_YAXIS
 Reel Speed = KEY_SPACE,JOY1_ZAXIS_POS
 Stick X-Axis = JOY1_RXAXIS
 Stick Y-Axis = JOY1_RYAXIS
 Cast = KEY_Z,JOY1_BUTTON1
 Select = KEY_X,JOY1_BUTTON2
 Tension = KEY_T,JOY1_ZAXIS_NEG

Input System Settings
---------------------

Input System: SDL

Keyboards:
 System Keyboard
Mice:
 System Mouse
Joysticks:
 1: Sony Interactive Entertainment Wireless Controller

Common Keyboard Settings:
 Sensitivity = 25 %
 Decay Speed = 50 %
Common Mouse Settings:
 X-Axis  Dead Zone = 0 %
 Y-Axis  Dead Zone = 0 %
 Z-Axis  Dead Zone = 0 %
Joystick 1 Settings:
 X-Axis  Min Value        = -32768
 X-Axis  Center/Off Value = 0
 X-Axis  Max Value        = 32767
 X-Axis  Dead Zone        = 1 %
 X-Axis  Saturation       = 100 %
 Y-Axis  Min Value        = -32768
 Y-Axis  Center/Off Value = 0
 Y-Axis  Max Value        = 32767
 Y-Axis  Dead Zone        = 1 %
 Y-Axis  Saturation       = 100 %
 Z-Axis  Min Value        = -32768
 Z-Axis  Center/Off Value = -32767
 Z-Axis  Max Value        = 32767
 Z-Axis  Dead Zone        = 1 %
 Z-Axis  Saturation       = 100 %
 RX-Axis Min Value        = -32768
 RX-Axis Center/Off Value = 0
 RX-Axis Max Value        = 32767
 RX-Axis Dead Zone        = 1 %
 RX-Axis Saturation       = 100 %
 RY-Axis Min Value        = -32768
 RY-Axis Center/Off Value = 0
 RY-Axis Max Value        = 32767
 RY-Axis Dead Zone        = 1 %
 RY-Axis Saturation       = 100 %
 RZ-Axis Min Value        = -32768
 RZ-Axis Center/Off Value = -32767
 RZ-Axis Max Value        = 32767
 RZ-Axis Dead Zone        = 1 %
 RZ-Axis Saturation       = 100 %

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant