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):
|
||||
self.controllers = []
|
||||
if not joy.get_name() in CONTROLLERS:
|
||||
self.get_connection_type(joy.get_name())
|
||||
self.controllers.append(GenericController(joy))
|
||||
self.controllers.append(GenericController(joy, self.get_connection_type(joy.get_name())))
|
||||
else:
|
||||
self.get_connection_type(joy.get_name())
|
||||
self.controllers.append(CONTROLLERS[joy.get_name()](joy))
|
||||
self.controllers.append(CONTROLLERS[joy.get_name()](joy, self.get_connection_type(joy.get_name())))
|
||||
|
||||
def get_connection_type(self, controller_name):
|
||||
for path in list_devices()
|
||||
|
Reference in New Issue
Block a user