GlosSIConfig: Emulate DS4 config

pull/169/head
Peter Repukat 2 years ago
parent 69bfef05c1
commit 60162d745a

@ -86,6 +86,7 @@ void UIModel::readConfigs()
json["disableOverlay"] = filejson["window"]["disableOverlay"];
json["maxControllers"] = filejson["controller"]["allowDesktopConfig"];
json["allowDesktopConfig"] = filejson["controller"]["allowDesktopConfig"];
json["emulateDS4"] = filejson["controller"]["emulateDS4"];
json["name"] = filejson.contains("name") ? filejson["name"] : QString(name).replace(QRegularExpression("\\.json"), "");
@ -371,6 +372,7 @@ void UIModel::writeTarget(const QJsonObject& json, const QString& name)
QJsonObject controllerObject;
controllerObject["maxControllers"] = json["maxControllers"];
controllerObject["allowDesktopConfig"] = json["allowDesktopConfig"];
controllerObject["emulateDS4"] = json["emulateDS4"];
fileJson["controller"] = controllerObject;
auto wtf = QString(QJsonDocument(fileJson).toJson(QJsonDocument::Indented)).toStdString();

@ -46,6 +46,7 @@ Item {
disableOverlay: false,
realDeviceIds: false,
allowDesktopConfig: true,
emulateDS4: false,
})
function resetInfo() {
@ -66,6 +67,7 @@ Item {
disableOverlay: false,
realDeviceIds: false,
allowDesktopConfig: true,
emulateDS4: false,
})
}
@ -82,6 +84,7 @@ Item {
disableOverlayCheckbox.checked = shortcutInfo.disableOverlay || false
realDeviceIds.checked = shortcutInfo.realDeviceIds || false
allowDesktopConfig.checked = shortcutInfo.allowDesktopConfig || true
emulateDS4.checked = shortcutInfo.emulateDS4 || false
}
Flickable {
@ -318,7 +321,7 @@ Item {
RPane {
width: parent.width / 2 - 8
height: 294
height: 394
radius: 4
Material.elevation: 32
bgOpacity: 0.97
@ -326,7 +329,7 @@ Item {
Column {
spacing: 2
width: parent.width
RadioButton {
CheckBox {
id: hideDevices
text: qsTr("Hide (Real) Controllers")
checked: shortcutInfo.hideDevices
@ -349,7 +352,7 @@ Item {
width: 1
height: 4
}
RadioButton {
CheckBox {
id: realDeviceIds
text: qsTr("Use real device (USB)-IDs")
checked: shortcutInfo.realDeviceIds
@ -372,6 +375,23 @@ Item {
width: 1
height: 4
}
CheckBox {
id: emulateDS4
text: qsTr("Emulate DS4")
checked: shortcutInfo.emulateDS4
onCheckedChanged: shortcutInfo.emulateDS4 = checked
}
Label {
text: qsTr("Instead of X360 Pad; Disable \"Playstation Configuration support\" in Steam")
wrapMode: Text.WordWrap
width: parent.width
leftPadding: 32
topPadding: -8
}
Item {
width: 1
height: 4
}
Row {
leftPadding: 16
Label {

Loading…
Cancel
Save