From 803ed475af77631259ce0969aad8b728168417ed Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Wed, 17 Oct 2018 10:25:14 +1100 Subject: [PATCH] Added xinput1_3-XInputSetState patchset --- patches/patchinstall.sh | 19 +++++++++++++ ...-SUCCESS-from-XInputSetState-when-FF.patch | 27 +++++++++++++++++++ patches/xinput1_3-XInputSetState/definition | 1 + 3 files changed, 47 insertions(+) create mode 100644 patches/xinput1_3-XInputSetState/0001-xinput1_3-Report-SUCCESS-from-XInputSetState-when-FF.patch create mode 100644 patches/xinput1_3-XInputSetState/definition diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 9e17a25d..5ecab9d9 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -409,6 +409,7 @@ patch_enable_all () enable_xaudio2_7_OnVoiceProcessingPassStart="$1" enable_xaudio2_7_WMA_support="$1" enable_xaudio2_CommitChanges="$1" + enable_xinput1_3_XInputSetState="$1" } # Enable or disable a specific patchset @@ -1393,6 +1394,9 @@ patch_enable () xaudio2_CommitChanges) enable_xaudio2_CommitChanges="$2" ;; + xinput1_3-XInputSetState) + enable_xinput1_3_XInputSetState="$2" + ;; *) return 1 ;; @@ -8202,6 +8206,21 @@ if test "$enable_xaudio2_CommitChanges" -eq 1; then ) >> "$patchlist" fi +# Patchset xinput1_3-XInputSetState +# | +# | This patchset fixes the following Wine bugs: +# | * [#45992] Report SUCCESS from XInputSetState when FFB isn't available. +# | +# | Modified files: +# | * dlls/xinput1_3/hid.c +# | +if test "$enable_xinput1_3_XInputSetState" -eq 1; then + patch_apply xinput1_3-XInputSetState/0001-xinput1_3-Report-SUCCESS-from-XInputSetState-when-FF.patch + ( + printf '%s\n' '+ { "Beren Minor", "xinput1_3: Report SUCCESS from XInputSetState when FFB isn'\''t available.", 1 },'; + ) >> "$patchlist" +fi + if test "$enable_patchlist" -eq 1; then diff --git a/patches/xinput1_3-XInputSetState/0001-xinput1_3-Report-SUCCESS-from-XInputSetState-when-FF.patch b/patches/xinput1_3-XInputSetState/0001-xinput1_3-Report-SUCCESS-from-XInputSetState-when-FF.patch new file mode 100644 index 00000000..0d2078f0 --- /dev/null +++ b/patches/xinput1_3-XInputSetState/0001-xinput1_3-Report-SUCCESS-from-XInputSetState-when-FF.patch @@ -0,0 +1,27 @@ +From 29bf6ebc75921647868d65f2eb851f00cf8f6401 Mon Sep 17 00:00:00 2001 +From: Beren Minor +Date: Mon, 15 Oct 2018 02:36:14 +0200 +Subject: [PATCH] xinput1_3: Report SUCCESS from XInputSetState when FFB isn't + available. + +Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45992 +--- + dlls/xinput1_3/hid.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dlls/xinput1_3/hid.c b/dlls/xinput1_3/hid.c +index 8a35443..7883352 100644 +--- a/dlls/xinput1_3/hid.c ++++ b/dlls/xinput1_3/hid.c +@@ -460,7 +460,7 @@ DWORD HID_set_state(xinput_controller* device, XINPUT_VIBRATION* state) + return ERROR_SUCCESS; + } + +- return ERROR_NOT_SUPPORTED; ++ return ERROR_SUCCESS; + } + + void HID_enable(xinput_controller* device, BOOL enable) +-- +1.9.1 + diff --git a/patches/xinput1_3-XInputSetState/definition b/patches/xinput1_3-XInputSetState/definition new file mode 100644 index 00000000..d39f1e30 --- /dev/null +++ b/patches/xinput1_3-XInputSetState/definition @@ -0,0 +1 @@ +Fixes: [45992] Report SUCCESS from XInputSetState when FFB isn't available.