1
0
forked from Clones/Controlify

✏️ Make rumble effects merge together rather than pausing one another when playing in unison (plays the stronger magnitude for both motors)

This commit is contained in:
isXander
2023-08-10 23:59:43 +01:00
parent 421b8abfc2
commit 58fe5c7043
9 changed files with 71 additions and 49 deletions

View File

@ -14,6 +14,7 @@ import dev.isxander.controlify.controller.joystick.mapping.UnmappedJoystickMappi
import dev.isxander.controlify.rumble.RumbleCapable;
import dev.isxander.controlify.rumble.RumbleManager;
import dev.isxander.controlify.rumble.RumbleSource;
import dev.isxander.controlify.rumble.RumbleState;
import java.util.List;
import java.util.Optional;
@ -41,7 +42,7 @@ public class FakeController implements JoystickController<JoystickConfig> {
this.config = new JoystickConfig(this);
this.rumbleManager = new RumbleManager(new RumbleCapable() {
@Override
public boolean setRumble(float strongMagnitude, float weakMagnitude, RumbleSource source) {
public boolean setRumble(float strongMagnitude, float weakMagnitude) {
return false;
}
@ -49,6 +50,11 @@ public class FakeController implements JoystickController<JoystickConfig> {
public boolean supportsRumble() {
return false;
}
@Override
public RumbleState applyRumbleSourceStrength(RumbleState state, RumbleSource source) {
return state;
}
});
this.config.deadzonesCalibrated = true;
}