From 1c2565cf39f4f6ca3b5d7ba0f137ffcbc065197a Mon Sep 17 00:00:00 2001 From: Lerking Date: Mon, 5 May 2025 09:22:33 +0200 Subject: [PATCH] Update pygameControls/generic_controller.py --- pygameControls/generic_controller.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pygameControls/generic_controller.py b/pygameControls/generic_controller.py index 40fd9ac..04f3ea0 100644 --- a/pygameControls/generic_controller.py +++ b/pygameControls/generic_controller.py @@ -1,5 +1,6 @@ import pygame from pygameControls.controlsbase import ControlsBase +from enums import ConnectionType class GenericController(ControlsBase): def __init__(self, joy, connection_type): @@ -7,7 +8,7 @@ class GenericController(ControlsBase): self.instance_id: int = self.device.get_instance_id() self.name = self.device.get_name() self.guid = self.device.get_guid() - self.connection_type = connection_type + self.connection_type = ConnectionType(connection_type.values()) self.numaxis: int = self.device.get_numaxes() self.axis: list = [self.device.get_axis(a) for a in range(self.numaxis)] self.numhats: int = self.device.get_numhats() @@ -30,6 +31,7 @@ class GenericController(ControlsBase): "logo button": None } print(f"{self.name} connected.") + print(f"Connection type: {connection_type.capitalize()}") def close(self): pass