1
0
forked from Clones/Controlify

fix vibration category not appearing if screen is opened via keyboard

This commit is contained in:
isXander
2023-04-21 23:05:21 +01:00
parent 9be7541b8a
commit 9e08c2cd98
3 changed files with 37 additions and 30 deletions

View File

@ -92,14 +92,13 @@ public class GamepadController extends AbstractController<GamepadState, GamepadC
strongMagnitude *= strengthMod;
weakMagnitude *= strengthMod;
return drivers.rumbleDriver().rumble(strongMagnitude, weakMagnitude);
return drivers.rumbleDriver().rumble(Math.min(strongMagnitude, 1), Math.min(weakMagnitude, 1));
}
@Override
public boolean canRumble() {
return drivers.rumbleDriver().isRumbleSupported()
&& config().allowVibrations
&& ControlifyApi.get().currentInputMode() == InputMode.CONTROLLER;
&& config().allowVibrations;
}
@Override