Provide detection and help for unmapped gamepads. Fixes #70

This commit is contained in:
Cameron Gutman
2018-09-29 19:14:52 -07:00
parent 1ad072236d
commit 4ad27670ec
6 changed files with 125 additions and 6 deletions

View File

@@ -46,6 +46,12 @@ GridView {
noHwDecoderDialog.open()
}
var unmappedGamepads = prefs.getUnmappedGamepads()
if (unmappedGamepads) {
unmappedGamepadDialog.unmappedGamepads = unmappedGamepads
unmappedGamepadDialog.open()
}
// Don't show any highlighted item until interacting with them
currentIndex = -1
}
@@ -244,6 +250,20 @@ GridView {
}
}
MessageDialog {
id: unmappedGamepadDialog
property string unmappedGamepads : ""
modality:Qt.WindowModal
icon: StandardIcon.Warning
standardButtons: StandardButton.Ok | StandardButton.Help
text: "Moonlight detected gamepads without a proper mapping. " +
"The following gamepads will not function until this is resolved: " + unmappedGamepads + "\n\n" +
"Click the Help button for information on how to map your gamepads."
onHelp: {
Qt.openUrlExternally("https://github.com/moonlight-stream/moonlight-docs/wiki/Gamepad-Mapping");
}
}
MessageDialog {
id: pairDialog
// don't allow edits to the rest of the window while open