Commit fce8e089 authored by dheideman's avatar dheideman

Add joystick button limit

parent 667c1e12
...@@ -27,6 +27,8 @@ SetupPage { ...@@ -27,6 +27,8 @@ SetupPage {
pageName: qsTr("Joystick") pageName: qsTr("Joystick")
pageDescription: qsTr("Joystick Setup is used to configure a calibrate joysticks.") pageDescription: qsTr("Joystick Setup is used to configure a calibrate joysticks.")
readonly property real _maxButtons: 16
Connections { Connections {
target: joystickManager target: joystickManager
onAvailableJoysticksChanged: { onAvailableJoysticksChanged: {
...@@ -560,7 +562,7 @@ SetupPage { ...@@ -560,7 +562,7 @@ SetupPage {
Repeater { Repeater {
id: buttonActionRepeater id: buttonActionRepeater
model: _activeJoystick ? _activeJoystick.totalButtonCount : 0 model: _activeJoystick ? Math.min(_activeJoystick.totalButtonCount, _maxButtons) : 0
Row { Row {
spacing: ScreenTools.defaultFontPixelWidth spacing: ScreenTools.defaultFontPixelWidth
...@@ -627,7 +629,7 @@ SetupPage { ...@@ -627,7 +629,7 @@ SetupPage {
Repeater { Repeater {
id: jsButtonActionRepeater id: jsButtonActionRepeater
model: _activeJoystick ? _activeJoystick.totalButtonCount : 0 model: _activeJoystick ? Math.min(_activeJoystick.totalButtonCount, _maxButtons) : 0
Row { Row {
spacing: ScreenTools.defaultFontPixelWidth spacing: ScreenTools.defaultFontPixelWidth
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment