Mouse wheel event in passthrought vs direct usb

Titan Two general support. Questions, firmware update, feature request.

Mouse wheel event in passthrought vs direct usb

Postby paname » Mon Mar 12, 2018 10:36 am

Code: Select all
 
#pragma METAINFO("base", 1, 0, "paname")
 
init {
mousemapping();
keymapping();
 
}
 
main {
mouse_passthru();
key_passthru();
}
 


using this simple script you can check that the scroll line number differ by a factor of 4 compared to directly attaching the same mouse to the pc. this makes some function break in games like weapon swap getting 4 events instead of one.

you can change the settings in windows to move only a single line per scroll to better exhibit the issue.

try with an excel file with the row numbering you will notice that via t2 it scroll 4 times faster than via direct USB.

OS: windows 10

Device physical setup:
Input A = g903 mouse wireless dongle but same with wired g502
Input B = none
Output = PC multihid
Prog = PC

I also put it on github : https://github.com/J2Kbr/TitanTwo/issues/121
User avatar
paname
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 204
Joined: Wed Jan 07, 2015 3:02 pm

Re: Mouse wheel event in passthrought vs direct usb

Postby J2Kbr » Tue Mar 13, 2018 6:35 pm

In theory this shouldn't be happening, as when mouse_passthru() is called, it gets the raw values from the connected mouse, without any modification (not considering modifications later performed via script).

Thank you for adding to GitHub, I will be testing and debugging this soon.
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: Mouse wheel event in passthrought vs direct usb

Postby paname » Thu Mar 15, 2018 11:47 am

J2Kbr wrote:In theory this shouldn't be happening, as when mouse_passthru() is called, it gets the raw values from the connected mouse, without any modification (not considering modifications later performed via script).

Thank you for adding to GitHub, I will be testing and debugging this soon.


thanks. Waiting for your feedback on this, I have a workaround sort of around this behaviour but it is not clean. :)
User avatar
paname
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 204
Joined: Wed Jan 07, 2015 3:02 pm

Re: Mouse wheel event in passthrought vs direct usb

Postby J2Kbr » Thu Mar 15, 2018 11:50 am

Please let me know about your workaround (can be via PM if your prefer).
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: Mouse wheel event in passthrought vs direct usb

Postby paname » Thu Mar 15, 2018 2:16 pm

J2Kbr wrote:Please let me know about your workaround (can be via PM if your prefer).


my workaround is just to catch the wheel event and use a combo like this:


Code: Select all
 
 
init {
    const uint8 mmap[] = {
        MWHEEL_FORWARD,     PS4_R3,
        MWHEEL_BACKWARD,    PS4_TRIANGLE,
    };
    mousemapping(mmap);
 
}
main {
             mouse_passthru();
             key_passthru();
 
        // wheel fix
 
            if (is_active(PS4_TRIANGLE)) {
                mouse_set(MOUSE_WHEEL,0);
                combo_run(WheelDownFix);
                }
            if (is_active(PS4_R3)) {
                mouse_set(MOUSE_WHEEL,0);
                combo_run(WheelUpFix);
            }
}
 
combo WheelDownFix {
    mouse_set(MOUSE_WHEEL , -1);
    wait(30);
    mouse_set(MOUSE_WHEEL , 0);
}
combo WheelUpFix {
    mouse_set(MOUSE_WHEEL , 1);
    wait(30);
    mouse_set(MOUSE_WHEEL , 0);
}
 
 


the wait time in the combo can even be wait(0) it also fix the issue.

if I don't use this "fix" for every wheel move it sends 4 moves instead of 1 when the mouse is directly connected to PC usb.
it still send longer than what raw should be but at least my game isn't confused by multiple wheel events.
User avatar
paname
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 204
Joined: Wed Jan 07, 2015 3:02 pm

Re: Mouse wheel event in passthrought vs direct usb

Postby J2Kbr » Thu Mar 15, 2018 7:32 pm

Thanks. With important tasks done in the update released today, now I will be able focus on the GitHub issues, including this. :smile0517:
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: Mouse wheel event in passthrought vs direct usb

Postby J2Kbr » Fri Mar 16, 2018 11:51 am

Found the issue, fixed on firmware 0.98B-36. Thanks for reporting.
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: Mouse wheel event in passthrought vs direct usb

Postby paname » Fri Mar 16, 2018 12:50 pm

J2Kbr wrote:Found the issue, fixed on firmware 0.98B-36. Thanks for reporting.


:joia: :joia:
User avatar
paname
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 204
Joined: Wed Jan 07, 2015 3:02 pm


Return to Titan Two Device

Who is online

Users browsing this forum: No registered users and 56 guests