8 Commits
v0.2.3 ... main

Author SHA1 Message Date
0a3042b93c Merge pull request 'Added Logitech Rumblepad 2. /JL' (#30) from 0.2.7 into main
Reviewed-on: #30
2025-05-13 14:01:21 +02:00
73fecc1904 Added Logitech Rumblepad 2. /JL
Some checks failed
Run Controller Tests / test (push) Has been cancelled
2025-05-13 14:01:01 +02:00
ed252a6548 Merge pull request 'Added Logitech F710 gamepad. /JL' (#29) from 0.2.6 into main
Reviewed-on: #29
2025-05-13 13:57:42 +02:00
ad3214dd23 Added Logitech F710 gamepad. /JL
Some checks failed
Run Controller Tests / test (push) Has been cancelled
2025-05-13 13:57:10 +02:00
311b047bf5 Merge pull request 'Removed debuging prints. /JL' (#28) from 0.2.5 into main
Reviewed-on: #28
2025-05-07 21:46:57 +02:00
13901aeb50 Removed debuging prints. /JL
Some checks failed
Run Controller Tests / test (push) Has been cancelled
2025-05-07 21:44:07 +02:00
5f3f25cc8c Merge pull request 'Updated initialization code. /JL' (#27) from 0.2.4 into main
Reviewed-on: #27
2025-05-07 21:41:01 +02:00
96ae8860d5 Updated initialization code. /JL
Some checks failed
Run Controller Tests / test (push) Has been cancelled
2025-05-07 21:40:40 +02:00
5 changed files with 9 additions and 11 deletions

View File

@@ -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.3-blue)
![Version](https://img.shields.io/badge/version-0.2.5-blue)

View File

@@ -4,7 +4,6 @@ from pygameControls import globals
if __name__ == "__main__":
pygame.init()
globals.init()
done = False

View File

@@ -1,20 +1,18 @@
import pygame
from . import globals
__version__ = "0.2.3"
__version__ = "0.2.7"
class Controllers:
def __init__(self, joy):
globals.init()
self.controllers = []
cont = self.detect_controller(joy.get_guid())
print(cont)
self.controllers.append(cont(joy))
def detect_controller(self, guid):
for gp in globals.GAMEPADS:
print(gp)
for p in globals.GAMEPADS[gp]:
print(p)
if p["guid"] != guid:
continue
return p["class"]

View File

@@ -183,7 +183,7 @@ def init():
},
{
"vidpid": "046d:c21d",
"guid": "",
"guid": "0333443e6d0400001fc2000005030000",
"connection": ConnectionType.USB,
"input": InputType.XInput,
"name": [
@@ -194,14 +194,15 @@ def init():
},
{
"vidpid": "046d:c216",
"guid": "",
"guid": "03005d8e6d04000019c2000011010000",
"connection": ConnectionType.USB,
"input": InputType.DirectInput,
"name": [
"Logitech, Inc. F710 Gamepad [DirectInput Mode]",
"Logitech Dual Action"
"Logitech Dual Action",
"Logitech Cordless Rumblepad 2"
],
"class": CONTROLLERS["Logitech Dual Action"]
"class": CONTROLLERS["Logitech Rumblepad 2"]
}
]
}

View File

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