GlosSIConfig: Option to use real device ids

pull/169/head
Peter Repukat 2 years ago
parent f77e0c4a66
commit d7dd8d30cc

@ -79,6 +79,7 @@ void UIModel::readConfigs()
json["closeOnExit"] = filejson["launch"]["closeOnExit"];
json["waitForChildProcs"] = filejson["launch"]["waitForChildProcs"];
json["hideDevices"] = filejson["devices"]["hideDevices"];
json["realDeviceIds"] = filejson["devices"]["realDeviceIds"];
json["windowMode"] = filejson["window"]["windowMode"];
json["maxFps"] = filejson["window"]["maxFps"];
json["scale"] = filejson["window"]["scale"];
@ -350,6 +351,7 @@ void UIModel::writeTarget(const QJsonObject& json, const QString& name)
QJsonObject devicesObject;
devicesObject["hideDevices"] = json["hideDevices"];
devicesObject["realDeviceIds"] = json["realDeviceIds"];
fileJson["devices"] = devicesObject;
QJsonObject windowObject;

@ -43,7 +43,8 @@ Item {
scale: null,
icon: null,
maxControllers: 4,
disableOverlay: false
disableOverlay: false,
realDeviceIds: false
})
function resetInfo() {
@ -61,7 +62,8 @@ Item {
scale: null,
icon: null,
maxControllers: 4,
disableOverlay: false
disableOverlay: false,
realDeviceIds: false
})
}
@ -75,7 +77,8 @@ Item {
hideDevices.checked = shortcutInfo.hideDevices || false
windowMode.checked = shortcutInfo.windowMode || false
maxControllersSpinBox.value = shortcutInfo.maxControllers
disableOverlayCheckbox = shortcutInfo.disableOverlay || false
disableOverlayCheckbox.checked = shortcutInfo.disableOverlay || false
realDeviceIds.checked = shortcutInfo.realDeviceIds || false
}
Column {
@ -253,7 +256,7 @@ Item {
}
Item {
width: 1
height: 16
height: 8
}
Row {
spacing: 16
@ -261,7 +264,7 @@ Item {
RPane {
width: parent.width / 2 - 8
height: 224
height: 294
radius: 4
Material.elevation: 32
bgOpacity: 0.97
@ -269,7 +272,7 @@ Item {
Column {
spacing: 2
width: parent.width
CheckBox {
RadioButton {
id: hideDevices
text: qsTr("Hide (Real) Controllers")
checked: shortcutInfo.hideDevices
@ -292,6 +295,29 @@ Item {
width: 1
height: 4
}
RadioButton {
id: realDeviceIds
text: qsTr("Use real device (USB)-IDs")
checked: shortcutInfo.realDeviceIds
onCheckedChanged: shortcutInfo.realDeviceIds = checked
}
Label {
text: qsTr("Only enable if input's are not recognized by the game")
wrapMode: Text.WordWrap
width: parent.width
leftPadding: 32
topPadding: -8
}
Label {
text: qsTr("If enabled, device-hiding won't work.\nUse the \"Max. Controller count\" setting!")
wrapMode: Text.WordWrap
width: parent.width
leftPadding: 32
}
Item {
width: 1
height: 4
}
Row {
leftPadding: 16
Label {
@ -311,7 +337,7 @@ Item {
}
RPane {
width: parent.width / 2 - 8
height: 224
height: 294
radius: 4
Material.elevation: 32
bgOpacity: 0.97
@ -346,17 +372,15 @@ Item {
text: qsTr("Disable Steam/GlosSI overlay")
checked: shortcutInfo.disableOverlay
onCheckedChanged: shortcutInfo.disableOverlay = checked
}
Label {
}
Label {
text: qsTr("Only controller emulation - No extra window")
wrapMode: Text.WordWrap
width: parent.width
leftPadding: 32
topPadding: -8
}
}
}
}
}
}

Loading…
Cancel
Save