Skip to content
This repository has been archived by the owner on Nov 27, 2022. It is now read-only.

Commit

Permalink
internal/gamepad: improve resetting vibrations
Browse files Browse the repository at this point in the history
  • Loading branch information
hajimehoshi committed Jul 15, 2022
1 parent 90ac7d0 commit 356c625
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/gamepad/gamepad_xbox_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ func (n *nativeGamepadXbox) hatState(hat int) int {

func (n *nativeGamepadXbox) vibrate(duration time.Duration, strongMagnitude float64, weakMagnitude float64) {
if strongMagnitude <= 0 && weakMagnitude <= 0 {
n.vib = false
n.gameInputDevice.SetRumbleState(&_GameInputRumbleParams{
lowFrequency: 0,
highFrequency: 0,
Expand Down

0 comments on commit 356c625

Please sign in to comment.