GUID identification used to determine gamepad. /JL

This commit is contained in:
2025-05-06 20:47:01 +02:00
parent e99f8f761c
commit e02148c937
20 changed files with 287 additions and 204 deletions

View File

@@ -17,12 +17,11 @@ from pygameControls.controlsbase import ControlsBase
from enums import ConnectionType
class LogitechDualActionController(ControlsBase):
def __init__(self, joy, connection_type):
def __init__(self, joy):
self.device = joy
self.instance_id: int = self.device.get_instance_id()
self.name = self.device.get_name()
self.guid = self.device.get_guid()
self.connection_type = ConnectionType(connection_type.values())
self.powerlevel = self.device.get_power_level()
self.numaxis: int = self.device.get_numaxes()
self.axis: list = [self.device.get_axis(a) for a in range(self.numaxis)]
@@ -46,7 +45,6 @@ class LogitechDualActionController(ControlsBase):
"logo button": None
}
print(f"{self.name} connected.")
print(f"Connection type: {connection_type.capitalize()}")
def close(self):
pass