apsun / AbsoluteTouchEx

Turns your Windows precision touchpad into a tablet. Kind of.
MIT License
116 stars 14 forks source link

osu! 2015 client as workaround and potential solutions for ELAN #28

Open imstuff1 opened 1 year ago

imstuff1 commented 1 year ago

I have a similar issue to many (#5, #8, #12, #20) where the absolute positioning freezes the cursor with an ELAN touchpad, but it seems to work in the 2015 client. My best guess is that peppy implemented some kind of anti-cheat/update that prevents the touchpad raw input header from being passed properly in some devices.

There are two problems that I ran into:

1. if (hdr.dwType == RIM_TYPEMOUSE) { return true; } interpreted the touchpad as a mouse and stopped AT_HandleRawInput from being handled properly resulting in a frozen cursor in absolute touch mode. Commenting this section of the code out solved the frozen cursor in absolute mode, but did not inject absolute input from the touchpad. This version might work for others.

2. image

It also seems that the raw input header was not being reported properly due to limitations of winapi with hdr.hDevice reporting 00000000. I'm working on a solution that uses WM_Pointer instead of WM_input since "classic Win32 API is not suitable for touch input at all" and it could also be helpful in preventing unintentional additional inputs from affecting gameplay.

Sources: 1----, 2----, 3----

phly95 commented 9 months ago

When you say: "Commenting this section of the code out solved the frozen cursor in absolute mode, but did not inject absolute input from the touchpad." is there a change in the code that does solve the problem that can be compiled in Visual Studio?

imstuff1 commented 9 months ago

You can try replacing atdll with my version: atdll.zip. The only significant thing I did was comment out the if statement and the return false statement below it around line 765.