From 79230bfef3b6345d0974fea03eee617eaa16dcb7 Mon Sep 17 00:00:00 2001 From: Jan Lerking Date: Wed, 7 May 2025 21:33:46 +0200 Subject: [PATCH] Updated DualShock4 support. /JL --- README.md | 2 +- pygameControls/controller.py | 2 +- pygameControls/globals.py | 4 ++-- pygameControls/sony_playstation4_controller.py | 8 ++------ setup.py | 2 +- 5 files changed, 7 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index ca0caa4..6186f74 100644 --- a/README.md +++ b/README.md @@ -3,4 +3,4 @@ Small module to make it easy to add controller support. ![Tests](https://gitpot-lerking.servehttp.com/api/v1/badges/CodingPirates/PyGame-Controller/workflows/test.yml) -![Version](https://img.shields.io/badge/version-0.2.2-blue) \ No newline at end of file +![Version](https://img.shields.io/badge/version-0.2.3-blue) \ No newline at end of file diff --git a/pygameControls/controller.py b/pygameControls/controller.py index 057b31f..3e61b19 100644 --- a/pygameControls/controller.py +++ b/pygameControls/controller.py @@ -1,7 +1,7 @@ import pygame from . import globals -__version__ = "0.2.2" +__version__ = "0.2.3" class Controllers: def __init__(self, joy): diff --git a/pygameControls/globals.py b/pygameControls/globals.py index cff0263..6724c60 100644 --- a/pygameControls/globals.py +++ b/pygameControls/globals.py @@ -126,10 +126,10 @@ def init(): }, { "vidpid": "054c:09cc", - "guid": "", + "guid": "05009b514c050000cc09000000810000", "connection": ConnectionType.BLUETOOTH, "input": InputType.DirectInput, - "name": ["DualShock 4 v2 Controller"], + "name": ["Wireless Controller"], "class": CONTROLLERS["Sony PLAYSTATION(R)4 Controller"] } ], diff --git a/pygameControls/sony_playstation4_controller.py b/pygameControls/sony_playstation4_controller.py index e1eef93..5534a85 100644 --- a/pygameControls/sony_playstation4_controller.py +++ b/pygameControls/sony_playstation4_controller.py @@ -23,12 +23,8 @@ class SonyPlayStation4Controller(ControlsBase): "left stick button": 11, "right stick button": 12, "logo button": 10, - "select button": 8, - "start button": 9, - "down button": 14, - "up button": 13, - "left button": 15, - "right button": 16 + "share button": 8, + "options button": 9 } print(f"{self.name} connected.") diff --git a/setup.py b/setup.py index 2174b0e..13efc43 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ if __name__ == "__main__": setup( name='pygameControls', - version='0.2.2', + version='0.2.3', packages=find_packages(), install_requires=[], author='Jan Lerking',