Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
zhulik committed Jul 4, 2023
1 parent 011138a commit f730079
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions resources/qml/DirectoryView/DirectoryView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Item {
}

SteamInputControl {
id: inputControl
objectName: "DirectoryView"
controller: steam_input.lastController

Expand Down Expand Up @@ -174,30 +175,29 @@ Item {
onCurrentIndexChanged: view.scrollHaptic()

function stopScrollMomentum() {
if (!steam_input.lastController) {
if (!inputControl.controller) {
return
}

const a = steam_input.lastController.actionSet.actionByName(
"scroll", false)
steam_input.lastController.stopAnalogActionMomentum(a)
const a = inputControl.controller.actionSet.actions["scroll"]
inputControl.controller.stopAnalogActionMomentum(a)
}

function stopScrollHaptic() {
if (!steam_input.lastController) {
if (!inputControl.controller) {
return
}

steam_input.lastController.triggerRepeatedHapticPulse(2900,
1200, 2)
inputControl.controller.triggerRepeatedHapticPulse(2900, 1200,
2)
}

function scrollHaptic() {
if (!steam_input.lastController) {
if (!inputControl.controller) {
return
}

steam_input.lastController.triggerRepeatedHapticPulse(500, 1, 1)
inputControl.controller.triggerRepeatedHapticPulse(500, 1, 1)
}

onAtYBeginningChanged: {
Expand Down
2 changes: 1 addition & 1 deletion resources/qml/QSteamworks/ActionText.qml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Label {
}

text: try {
steam_input.lastController.actionSet.actions[name].localizedName
activeControl.controller.actionSet.actions[name].localizedName
} catch (e) {
""
}
Expand Down

0 comments on commit f730079

Please sign in to comment.