Updated DualShock4 support. /JL
Some checks failed
Run Controller Tests / test (push) Has been cancelled
Some checks failed
Run Controller Tests / test (push) Has been cancelled
This commit is contained in:
@@ -3,4 +3,4 @@
|
|||||||
Small module to make it easy to add controller support.
|
Small module to make it easy to add controller support.
|
||||||
|
|
||||||

|

|
||||||

|

|
@@ -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):
|
||||||
|
@@ -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"]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@@ -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.")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user