https://bugs.winehq.org/show_bug.cgi?id=41317
Bug ID: 41317 Summary: WOLF RPG Editor (Game.exe): Arrow keys don't work properly when gamepad is connected Product: Wine Version: 1.9.18 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-dinput Assignee: wine-bugs@winehq.org Reporter: kakurasan@gmail.com Regression SHA1: c126b21a34be008534e4fbd2a0f8bb8ea08c6c2b Distribution: ---
Created attachment 55651 --> https://bugs.winehq.org/attachment.cgi?id=55651 Input test program which uses DX Library (source)
When gamepad is connected, the cursor or character moves automatically and arrow keys doesn't work properly.
Workaround: Disable all gamepads using joy.cpl, or use native dinput.dll
Note: WOLF RPG Editor uses a DirectX wrapper library called "DX Library" (open source).
Downloads (Japanese): * WOLF RPG Editor: http://www.silversecond.com/WolfRPGEditor/Download.html * DX Library: http://dxlib.o.oo7.jp/
----- Result of regression testing ----- c126b21a34be008534e4fbd2a0f8bb8ea08c6c2b is the first bad commit commit c126b21a34be008534e4fbd2a0f8bb8ea08c6c2b Author: Andrew Nguyen anguyen@codeweavers.com Date: Tue Jul 5 07:19:17 2011 -0500
dinput: Extract the DirectInput instance creation and initialization in DirectInputCreateEx to separate functions.
:040000 040000 f904caf8d290195557d1c2733d12288d8b4f9cf4 02e3e0e5a1ad1ee2fbb02e91bb09f093766c0e0e M dlls
https://bugs.winehq.org/show_bug.cgi?id=41317
--- Comment #1 from kakurasan@gmail.com --- Created attachment 55652 --> https://bugs.winehq.org/attachment.cgi?id=55652 Input test program which uses DX Library (binary)
https://bugs.winehq.org/show_bug.cgi?id=41317
kakurasan@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, regression
https://bugs.winehq.org/show_bug.cgi?id=41317
--- Comment #2 from Bruno Jesus 00cpxxx@gmail.com --- Unfortunately I cannot reproduce. I can light the triangles both with gamepad and keyboard. Can you printf() the input variable right after
int input = GetJoypadInputState (DX_INPUT_KEY_PAD1);
and attach a new compiled version, please?
From the library website I see no source code is available for the library,
right?
https://bugs.winehq.org/show_bug.cgi?id=41317
--- Comment #3 from Bruno Jesus 00cpxxx@gmail.com --- Can you attach a +dinput log, please?
https://bugs.winehq.org/show_bug.cgi?id=41317
--- Comment #4 from kakurasan@gmail.com --- Created attachment 55656 --> https://bugs.winehq.org/attachment.cgi?id=55656 Input test program which uses DX Library (binary, added printf())
https://bugs.winehq.org/show_bug.cgi?id=41317
--- Comment #5 from kakurasan@gmail.com --- Created attachment 55657 --> https://bugs.winehq.org/attachment.cgi?id=55657 WINEDEBUG=-all,+dinput log (test program)
https://bugs.winehq.org/show_bug.cgi?id=41317
--- Comment #6 from kakurasan@gmail.com --- The "Right" and "Down" triangles are always "pressed" state (input=5) until "Right or Left" and "Up or Down" arrow buttons are pressed. After this, both gamepad and keyboard work fine.
Joystick.exe in DirectX SDK shows that X Axis, Y Axis, Z Axis, and Z Rotation are always "8" when no arrow buttons are pressed. jstest-gtk shows that they are "0".
+------+----------+-------+ |Button|jstest-gtk|dinput | +------+----------+-------+ |Left |A0=-32767 |X=-996 | |Right |A0=32767 |X=1000 | |Up |A1=-32767 |Y=-996 | |Down |A1=32767 |Y=1000 | |(None)|A0=0,A1=0 |X=8,Y=8| +------+----------+-------+
Another workaround is to set DefaultDeadZone.
DX Library version 3.11 (the latest version of WOLF RPG Editor uses this version) source (7z archive): http://dxlib.o.oo7.jp/DxLib/DxLibMake3_11.exe
https://bugs.winehq.org/show_bug.cgi?id=41317
--- Comment #7 from Bruno Jesus 00cpxxx@gmail.com --- Created attachment 55659 --> https://bugs.winehq.org/attachment.cgi?id=55659 patch
Please try the attached patch.
https://bugs.winehq.org/show_bug.cgi?id=41317
--- Comment #8 from kakurasan@gmail.com --- The output of Joystick.exe didn't change, but the test program and Game.exe work as expected. Both gamepad and keyboard work fine. Thanks.
https://bugs.winehq.org/show_bug.cgi?id=41317
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|WOLF RPG Editor (Game.exe): |WOLF RPG Editor: Gamepad |Arrow keys don't work |axis value not recalculated |properly when gamepad is |after deadzone change |connected |results in ghost input | |events Keywords| |hardware
https://bugs.winehq.org/show_bug.cgi?id=41317
winetest@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |winetest@luukku.com
--- Comment #9 from winetest@luukku.com --- (In reply to Bruno Jesus from comment #7)
Created attachment 55659 [details] patch
Please try the attached patch.
Patch merges cleanly against 1.9.24.
https://bugs.winehq.org/show_bug.cgi?id=41317
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|wine-bugs@winehq.org |00cpxxx@gmail.com Status|UNCONFIRMED |NEW Ever confirmed|0 |1
--- Comment #10 from Bruno Jesus 00cpxxx@gmail.com --- (In reply to winetest from comment #9)
(In reply to Bruno Jesus from comment #7)
Created attachment 55659 [details] patch
Please try the attached patch.
Patch merges cleanly against 1.9.24.
I'm aware of that. Creating tests for this is a bit tricky so it should take some more time before attempting to merge in mainstream.
https://bugs.winehq.org/show_bug.cgi?id=41317
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #11 from joaopa jeremielapuree@yahoo.fr --- Is still a bug in current wine(3.20)?
https://bugs.winehq.org/show_bug.cgi?id=41317
--- Comment #12 from kakurasan@gmail.com --- (In reply to joaopa from comment #11)
Is still a bug in current wine(3.20)?
Yes, the bug is still present (and you can apply Bruno's patch) in Wine 3.20.
https://bugs.winehq.org/show_bug.cgi?id=41317
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
https://bugs.winehq.org/show_bug.cgi?id=41317
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #55659|0 |1 is patch| |
https://bugs.winehq.org/show_bug.cgi?id=41317
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |STAGED Staged patchset| |https://github.com/wine-sta | |ging/wine-staging/tree/mast | |er/patches/dinput-axis-reca | |lc
--- Comment #13 from Gijs Vermeulen gijsvrm@gmail.com --- Marking STAGED.
https://bugs.winehq.org/show_bug.cgi?id=41317
Rémi Bernon rbernon@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rbernon@codeweavers.com
--- Comment #14 from Rémi Bernon rbernon@codeweavers.com --- Staging patch probably won't apply anymore as the legacy code has been removed. Although I think this should now be correctly implemented by the HID joystick backend (there's a few related test cases checking it).
https://bugs.winehq.org/show_bug.cgi?id=41317
--- Comment #15 from kakurasan@gmail.com --- (In reply to Rémi Bernon from comment #14)
Staging patch probably won't apply anymore as the legacy code has been removed. Although I think this should now be correctly implemented by the HID joystick backend (there's a few related test cases checking it).
Wine Staging 6.19 works but unfortunately (vanilla) Wine 6.19 still has the issue.
https://bugs.winehq.org/show_bug.cgi?id=41317
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com
--- Comment #16 from Zebediah Figura z.figura12@gmail.com --- The dinput reimplementation postdates 6.19. It's not in an official release yet.
https://bugs.winehq.org/show_bug.cgi?id=41317
kakurasan@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |adfee25b45af8160848f94fdb24 | |279d63d5f91f4 Status|STAGED |RESOLVED Resolution|--- |FIXED
--- Comment #17 from kakurasan@gmail.com --- (In reply to Zebediah Figura from comment #16)
The dinput reimplementation postdates 6.19. It's not in an official release yet.
Thanks, the issue was fixed by:
commit adfee25b45af8160848f94fdb24279d63d5f91f4 Author: Rémi Bernon rbernon@codeweavers.com Date: Mon Oct 11 10:10:57 2021 +0200
dinput: Remove legacy joystick backends.
Signed-off-by: Rémi Bernon rbernon@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
https://bugs.winehq.org/show_bug.cgi?id=41317
--- Comment #18 from Rémi Bernon rbernon@codeweavers.com --- Nice, thanks for confirming!
https://bugs.winehq.org/show_bug.cgi?id=41317
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #19 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 6.20.