Update pygameControls/controller.py
Added connection type to class init. /JL
This commit is contained in:
@@ -30,11 +30,9 @@ class Controllers:
|
|||||||
def __init__(self, joy):
|
def __init__(self, joy):
|
||||||
self.controllers = []
|
self.controllers = []
|
||||||
if not joy.get_name() in CONTROLLERS:
|
if not joy.get_name() in CONTROLLERS:
|
||||||
self.get_connection_type(joy.get_name())
|
self.controllers.append(GenericController(joy, self.get_connection_type(joy.get_name())))
|
||||||
self.controllers.append(GenericController(joy))
|
|
||||||
else:
|
else:
|
||||||
self.get_connection_type(joy.get_name())
|
self.controllers.append(CONTROLLERS[joy.get_name()](joy, self.get_connection_type(joy.get_name())))
|
||||||
self.controllers.append(CONTROLLERS[joy.get_name()](joy))
|
|
||||||
|
|
||||||
def get_connection_type(self, controller_name):
|
def get_connection_type(self, controller_name):
|
||||||
for path in list_devices()
|
for path in list_devices()
|
||||||
|
Reference in New Issue
Block a user