[PATCH v7 0/1] MR10052: dinput: Return DIERR_UNSUPPORTED in dinput_device_Escape
At least Thrustmaster wheels are known for using the Escape method for communication between the driver and the game. This is not utilized by every game, but one that does is RaceRoom Racing Experience (RRRE). RRRE uses it to query/set the wheel range and set force strengths. The problematic part is the wheel range query, because the returned value (0) is not the real range and that throws off the internal logic of RRRE's engine and causes the wheel to snap in one direction. Returning DIERR_UNSUPPORTED clearly indicates that the call failed and RRRE no longer tries to use these methods for interaction with the wheel. Returning DIERR_UNSUPPORTED is also aligns with the behaviour of `hid_joystick_effect_Escape`. Captures of what RRRE used are available over here: https://github.com/Kimplul/hid-tmff2/issues/165 See this issue for more context and the resolution: https://github.com/Kimplul/hid-tmff2/issues/39#issuecomment-3104689106 -- v7: dinput: Return DIERR_UNSUPPORTED in dinput_device_Escape https://gitlab.winehq.org/wine/wine/-/merge_requests/10052
From: Viktor Balogh <viktor.balogh45@gmail.com> At least Thrustmaster wheels are known for using the Escape method for communication between the driver and the game. This is not utilized by every game, but one that does is RaceRoom Racing Experience (RRRE). RRRE uses it to query/set the wheel range and set force strengths. The problematic part is the wheel range query, because the returned value (0) is not the real range and that throws off the internal logic of RRRE's engine and causes the wheel to snap in one direction. Returning DIERR_UNSUPPORTED clearly indicates that the call failed and RRRE no longer tries to use these methods for interaction with the wheel. Returning DIERR_UNSUPPORTED is also aligns with the behaviour of hid_joystick_effect_Escape. --- dlls/dinput/device.c | 2 +- dlls/dinput/tests/force_feedback.c | 1 - dlls/dinput/tests/joystick8.c | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index 31240d03f65..35518dd91dd 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -1758,7 +1758,7 @@ static HRESULT WINAPI dinput_device_EnumCreatedEffectObjects( IDirectInputDevice static HRESULT WINAPI dinput_device_Escape( IDirectInputDevice8W *iface, DIEFFESCAPE *escape ) { FIXME( "iface %p, escape %p stub!\n", iface, escape ); - return DI_OK; + return DIERR_UNSUPPORTED; } static HRESULT WINAPI dinput_device_Poll( IDirectInputDevice8W *iface ) diff --git a/dlls/dinput/tests/force_feedback.c b/dlls/dinput/tests/force_feedback.c index 89caa86af9d..69a521b0e47 100644 --- a/dlls/dinput/tests/force_feedback.c +++ b/dlls/dinput/tests/force_feedback.c @@ -3597,7 +3597,6 @@ static BOOL test_force_feedback_joystick( DWORD version ) wait_hid_expect( file, 100 ); /* device gain reports are written asynchronously */ hr = IDirectInputDevice8_Escape( device, &escape ); - todo_wine ok( hr == DIERR_UNSUPPORTED, "Escape returned: %#lx\n", hr ); prop_dword.dwData = 0xdeadbeef; diff --git a/dlls/dinput/tests/joystick8.c b/dlls/dinput/tests/joystick8.c index fc33ba981e4..eab4a7ff7e8 100644 --- a/dlls/dinput/tests/joystick8.c +++ b/dlls/dinput/tests/joystick8.c @@ -3231,7 +3231,6 @@ static void test_simple_joystick( DWORD version ) escape.lpvOutBuffer = buffer + 10; escape.cbOutBuffer = 10; hr = IDirectInputDevice8_Escape( device, &escape ); - todo_wine ok( hr == DIERR_UNSUPPORTED, "Escape returned: %#lx\n", hr ); if (version == 0x800) test_action_map( device, file, event ); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10052
Rebased, but [test-linux-32](https://gitlab.winehq.org/wine/wine/-/jobs/227522) failed for some unrelated reason -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10052#note_129238
On Mon Feb 9 18:01:32 2026 +0000, Viktor Balogh wrote:
Rebased, but [test-linux-32](https://gitlab.winehq.org/wine/wine/-/jobs/227522) failed for some unrelated reason It happens, but don't worry it doesn't look related. Also fwiw you don't need to rebase MRs if there's no conflict, they will be automatically rebased on merge.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/10052#note_129244
On Mon Feb 9 18:01:32 2026 +0000, Rémi Bernon wrote:
It happens, but don't worry it doesn't look related. Also fwiw you don't need to rebase MRs if there's no conflict, they will be automatically rebased on merge. Oh, okay. I thought it needed because gitlab said "Fast forward merge is not possible. Please rebase."
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/10052#note_129245
participants (3)
-
Rémi Bernon (@rbernon) -
Viktor Balogh -
Viktor Balogh (@viktorb)