1
0
forked from Clones/Controlify

✏️ Abstract GUID and controller name into drivers

This commit is contained in:
isXander
2023-06-04 12:28:44 +01:00
parent b68f718901
commit e9e83a8b5e
8 changed files with 2051 additions and 12 deletions

View File

@ -32,13 +32,13 @@ public class GamepadController extends AbstractController<GamepadState, GamepadC
if (!GLFW.glfwJoystickIsGamepad(joystickId))
throw new IllegalArgumentException("Joystick " + joystickId + " is not a gamepad!");
if (!this.name.startsWith(type().friendlyName()))
setName(GLFW.glfwGetGamepadName(joystickId));
this.drivers = GamepadDrivers.forController(joystickId, hidInfo.hidDevice());
this.uniqueDrivers = drivers.getUniqueDrivers();
this.drivers.printDrivers();
if (!this.name.startsWith(type().friendlyName()))
setName(this.drivers.nameProviderDriver().getName());
this.rumbleManager = new RumbleManager(this);
this.defaultConfig = new GamepadConfig();