u/FokkusuES

I've been for the last 3 months trying to get to run properly the game The I of the Dragon on cachyos, with different proton versions, tried both the gog and the steam versions, so far I have 2 realistic options:

- I either play with the latest proton cachyos and have no working mouse buttons in game,

- Or I install the windows dinput8.dll component to the prefix with protontricks, add a override to the *.dinput8 library set to native and have horrendous mouse lag that is essentially unusuable but working correct mouse inputs for the buttons.

Trying on my own I learned that the issue with the mouse inputs only happen in the 3d game and not in the UI because the UI uses a different path (the same windows uses for the interface) vs when in the game world it uses DirectInput to return all the button presses, which in the current dinput8.dll/dinput.dll wine enumerates the mouse objects and gives them numbers, there is an offset of +3 in those numbers for the mouse buttons, left click reads as 2, right click reads as 3, middle mouse click reads as 4 (it reads as the numbers in the keyboard above letters, instead of the mouse buttons for the game).

TLDR:

  • Bug: DIDFT_MAKEINSTANCE values for mouse buttons in dlls/dinput/mouse.c mouse_enum_objects() start at 3 instead of 0
  • Effect: Mouse buttons in DirectInput8 exclusive mode map to wrong DIK keyboard codes (+3 offset)
  • Workaround attempted: Recompiling Wine 11.7 dinput with patched instance numbers, but hitting PE32 vs Wine builtin dll loading issues
  • The fix is a one-line change per button in mouse_enum_objects() in dlls/dinput/mouse.c

I would like either help, pointers, anything really, I'm really passionate about playing this game. If this isn't the right place to ask, I will forward this request to the proper channels, but I am clueless.

reddit.com
u/FokkusuES — 11 days ago