Skip to content

Commit

Permalink
Abstract the dis-play name
Browse files Browse the repository at this point in the history
  • Loading branch information
richardbuckle committed May 14, 2019
1 parent 6049114 commit 18a6eee
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion www/scripts/bindings.py
Expand Up @@ -694,7 +694,12 @@ def printListItem(configObj):
def controllersListName(rawKeys):
controllers = [fullKey.split('::')[0] for fullKey in rawKeys]
silencedControllers = ['Mouse', 'Keyboard']
controllers = [controller for controller in controllers if not controller in silencedControllers]
def displayName(controller):
try:
return hotasDetails[controller]['displayName']
except:
return controller
controllers = [displayName(controller) for controller in controllers if not controller in silencedControllers]
controllers.sort()
controllersStr = ', '.join(controllers)
return controllersStr
Expand Down

0 comments on commit 18a6eee

Please sign in to comment.