mirror of
https://github.com/lutris/lutris
synced 2024-10-06 07:50:16 +00:00
Handle improper joystick detection in Mednafen (Fixes: #842)
This commit is contained in:
parent
22b1af04b6
commit
c6c7d1e6cb
|
@ -152,7 +152,14 @@ class mednafen(Runner):
|
|||
""" Setup joystick mappings per machine """
|
||||
|
||||
# Get the controller mappings
|
||||
mapping = get_controller_mappings()[0][1]
|
||||
controller_mappings = get_controller_mappings()
|
||||
if not controller_mappings:
|
||||
logger.warning("No controller detected for joysticks %s.", joy_ids)
|
||||
return []
|
||||
|
||||
# TODO currently only supports the first controller. Add support for
|
||||
# other controllers.
|
||||
mapping = controller_mappings[0][1]
|
||||
|
||||
# Construct a dictionnary of button codes to parse to mendafen
|
||||
map_code = {
|
||||
|
|
Loading…
Reference in a new issue