Updated DualShock4 support. /JL
Some checks failed
Run Controller Tests / test (push) Has been cancelled

This commit is contained in:
2025-05-07 21:33:46 +02:00
parent 21da6857b0
commit 79230bfef3
5 changed files with 7 additions and 11 deletions

View File

@@ -3,4 +3,4 @@
Small module to make it easy to add controller support. 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) ![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) ![Version](https://img.shields.io/badge/version-0.2.3-blue)

View File

@@ -1,7 +1,7 @@
import pygame import pygame
from . import globals from . import globals
__version__ = "0.2.2" __version__ = "0.2.3"
class Controllers: class Controllers:
def __init__(self, joy): def __init__(self, joy):

View File

@@ -126,10 +126,10 @@ def init():
}, },
{ {
"vidpid": "054c:09cc", "vidpid": "054c:09cc",
"guid": "", "guid": "05009b514c050000cc09000000810000",
"connection": ConnectionType.BLUETOOTH, "connection": ConnectionType.BLUETOOTH,
"input": InputType.DirectInput, "input": InputType.DirectInput,
"name": ["DualShock 4 v2 Controller"], "name": ["Wireless Controller"],
"class": CONTROLLERS["Sony PLAYSTATION(R)4 Controller"] "class": CONTROLLERS["Sony PLAYSTATION(R)4 Controller"]
} }
], ],

View File

@@ -23,12 +23,8 @@ class SonyPlayStation4Controller(ControlsBase):
"left stick button": 11, "left stick button": 11,
"right stick button": 12, "right stick button": 12,
"logo button": 10, "logo button": 10,
"select button": 8, "share button": 8,
"start button": 9, "options button": 9
"down button": 14,
"up button": 13,
"left button": 15,
"right button": 16
} }
print(f"{self.name} connected.") print(f"{self.name} connected.")

View File

@@ -3,7 +3,7 @@ if __name__ == "__main__":
setup( setup(
name='pygameControls', name='pygameControls',
version='0.2.2', version='0.2.3',
packages=find_packages(), packages=find_packages(),
install_requires=[], install_requires=[],
author='Jan Lerking', author='Jan Lerking',