mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2025-12-05 03:34:52 +01:00
Use the better api for linux controller support and include it in the auto builds.
This commit is contained in:
parent
e9513d4733
commit
282ac22a46
5 changed files with 354 additions and 203 deletions
|
|
@ -692,7 +692,7 @@ int GetAnalogActionOrigins( InputHandle_t inputHandle, InputActionSetHandle_t ac
|
|||
|
||||
void StopAnalogActionMomentum( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t eAction )
|
||||
{
|
||||
PRINT_DEBUG("Steam_Controller::StopAnalogActionMomentum\n");
|
||||
PRINT_DEBUG("Steam_Controller::StopAnalogActionMomentum %llu %llu\n", controllerHandle, eAction);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -723,7 +723,12 @@ void TriggerVibration( ControllerHandle_t controllerHandle, unsigned short usLef
|
|||
auto controller = controllers.find(controllerHandle);
|
||||
if (controller == controllers.end()) return;
|
||||
|
||||
GamepadSetRumble((GAMEPAD_DEVICE)(controllerHandle - 1), ((double)usLeftSpeed) / 65535.0, ((double)usRightSpeed) / 65535.0);
|
||||
unsigned int rumble_length_ms = 0;
|
||||
#if defined(__linux__)
|
||||
//FIXME: shadow of the tomb raider on linux doesn't seem to turn off the rumble so I made it expire after 100ms. Need to check if this is how linux steam actually behaves.
|
||||
rumble_length_ms = 100;
|
||||
#endif
|
||||
GamepadSetRumble((GAMEPAD_DEVICE)(controllerHandle - 1), ((double)usLeftSpeed) / 65535.0, ((double)usRightSpeed) / 65535.0, rumble_length_ms);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue