1
0
forked from Clones/Controlify

add controlify.debug.print_trigger_state debug property

This commit is contained in:
isXander
2023-06-25 22:53:51 +01:00
parent a7fc6b2629
commit e524631438
3 changed files with 11 additions and 0 deletions

View File

@ -10,6 +10,7 @@ import dev.isxander.controlify.driver.*;
import dev.isxander.controlify.rumble.RumbleManager; import dev.isxander.controlify.rumble.RumbleManager;
import dev.isxander.controlify.rumble.RumbleSource; import dev.isxander.controlify.rumble.RumbleSource;
import dev.isxander.controlify.utils.ControllerUtils; import dev.isxander.controlify.utils.ControllerUtils;
import dev.isxander.controlify.utils.Log;
import net.minecraft.resources.ResourceLocation; import net.minecraft.resources.ResourceLocation;
import org.lwjgl.glfw.GLFW; import org.lwjgl.glfw.GLFW;
@ -90,6 +91,11 @@ public class GamepadController extends AbstractController<GamepadState, GamepadC
this.absoluteGyro.add(gyroState); this.absoluteGyro.add(gyroState);
state = new GamepadState(deadzoneAxesState, basicState.axes(), basicState.buttons(), gyroState, absoluteGyro); state = new GamepadState(deadzoneAxesState, basicState.axes(), basicState.buttons(), gyroState, absoluteGyro);
if (DebugProperties.PRINT_TRIGGER_STATE) {
Log.LOGGER.info("Left Trigger: " + state.gamepadAxes().leftTrigger());
Log.LOGGER.info("Right Trigger: " + state.gamepadAxes().rightTrigger());
}
} }
public GamepadState.GyroState absoluteGyroState() { public GamepadState.GyroState absoluteGyroState() {

View File

@ -20,6 +20,8 @@ public class DebugProperties {
public static final boolean PRINT_GYRO = boolProp("controlify.debug.print_gyro", false, false); public static final boolean PRINT_GYRO = boolProp("controlify.debug.print_gyro", false, false);
/* Print what drivers are being used */ /* Print what drivers are being used */
public static final boolean PRINT_DRIVER = boolProp("controlify.debug.print_driver", true, true); public static final boolean PRINT_DRIVER = boolProp("controlify.debug.print_driver", true, true);
/* Print the state of the left and right triggers on gamepads */
public static final boolean PRINT_TRIGGER_STATE = boolProp("controlify.debug.print_trigger_state", false, false);
/* Use experimental anti-snapback */ /* Use experimental anti-snapback */
public static final boolean USE_SNAPBACK = boolProp("controlify.debug.use_snapback", false, false); public static final boolean USE_SNAPBACK = boolProp("controlify.debug.use_snapback", false, false);

View File

@ -1,5 +1,8 @@
package dev.isxander.controlify.fixes.boatfix; package dev.isxander.controlify.fixes.boatfix;
/**
* @see dev.isxander.controlify.mixins.feature.fixes.boatfix.BoatMixin
*/
public interface AnalogBoatInput { public interface AnalogBoatInput {
void setAnalogInput(float forward, float right); void setAnalogInput(float forward, float right);
} }