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

@@ -10,12 +10,11 @@ from pygameControls.controlsbase import ControlsBase
from enums import ConnectionType
class LogitechF510Controller(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.numaxis: int = self.device.get_numaxis()
self.axis: list = []
self.numhats: int = self.device.get_numhats()
@@ -36,7 +35,6 @@ class LogitechF510Controller(ControlsBase):
"logo button": 8
}
print(f"{self.name} connected.")
print(f"Connection type: {connection_type.capitalize()}")
def close(self):
pass