1
0
forked from Clones/Controlify

🐛 fix rumble reported as unsupported if it's off

This commit is contained in:
isXander
2023-05-06 12:51:42 +01:00
parent ede64f471f
commit 9017b3008c
12 changed files with 61 additions and 23 deletions

View File

@ -94,7 +94,7 @@ public class SingleJoystickController extends AbstractController<JoystickState,
@Override
public boolean setRumble(float strongMagnitude, float weakMagnitude, RumbleSource source) {
if (!canRumble()) return false;
if (!supportsRumble()) return false;
var strengthMod = config().getRumbleStrength(source);
if (source != RumbleSource.MASTER)
@ -113,10 +113,8 @@ public class SingleJoystickController extends AbstractController<JoystickState,
}
@Override
public boolean canRumble() {
return rumbleSupported
&& config().allowVibrations
&& ControlifyApi.get().currentInputMode() == InputMode.CONTROLLER;
public boolean supportsRumble() {
return rumbleSupported;
}
@Override