From 803df7e08763fadf36a16f9885535eef5a89ee62 Mon Sep 17 00:00:00 2001 From: Lerking Date: Mon, 5 May 2025 09:30:54 +0200 Subject: [PATCH] Update pygameControls/xbox_series_x_controller.py --- pygameControls/xbox_series_x_controller.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pygameControls/xbox_series_x_controller.py b/pygameControls/xbox_series_x_controller.py index b64a631..29d7d5e 100644 --- a/pygameControls/xbox_series_x_controller.py +++ b/pygameControls/xbox_series_x_controller.py @@ -1,4 +1,6 @@ from pygameControls.controlsbase import ControlsBase +from enums import ConnectionType +import pygame class XboxSeriesXController(ControlsBase): def __init__(self, joy, connection_type): @@ -6,7 +8,7 @@ class XboxSeriesXController(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() @@ -28,6 +30,7 @@ class XboxSeriesXController(ControlsBase): "copy button": 10 } print(f"{self.name} connected.") + print(f"Connection type: {connection_type.capitalize()}") def close(self): self.device.quit()