Mouse Input method’ setting of ‘windows’ breaks mouse input

Continuing the discussion from ‘Mouse Input method’ setting of ‘windows’ breaks mouse input:

Please guys, according to alot of GTAV communities, the only config that has zero mouse acceleration is windows input in mouse config.

Meanwhile all RP players suffer with mouse acceleration.

To reproduce this issue, its easy, just open mouse/keyboard configuration, set mouse input to “windows”.
When you set this config, its impossible to move you screen properly.

This is a FIVEM bug since in original GTAV game, this input works normally.

Thanks.

WARNING

If you post here without knowing what you’re doing you’ll most likely get suspended, you should probably post in #technical-support instead.

Just to clarify, the ‘windows’ setting actually adds mouse acceleration usually. (I guess I’m an odd one since I can’t play without mouse acceleration while everyone else seems to hate it. I have to lift my mouse like 5 times just to make a 90 degree turn without mouse acceleration.) To achieve exact 1:1 mouse input you’ll likely want to use ‘raw Input’ which I believe takes the input directly from the driver filter. The ‘windows’ setting takes the input from Windows, and mouse acceleration is dependent on whether ‘enhance pointer precision’ is checked in the Windows mouse properties.

But yeah, this bug is really annoying and I wouldn’t be surprised if it’s a relatively simple thing to fix. I’d fix it myself but I don’t know much code and wouldn’t know where to begin in debugging it. It is really easy to reproduce though. Simply change the setting and try to play the game normally; It’s impossible to aim/look around. You move your mouse one pixel/count and the view flails all over the place.

In case anyone is wondering, this issue appears to have been fixed in the latest release and canary builds. We can finally switch our input method back to ‘windows’.

Seems I spoke too soon. Overall ‘windows’ mouse input works now without flailing the camera. But as far as I can tell GetNuiCursorPosition() is still broken. I first noticed this while attempting to use DPClothing and the UI wasn’t working.

Can’t confirm this, setting cursor mode to Windows still makes this work fine (but only with NUI focus enabled, as otherwise the game will reset cursor to center position! that native can’t be relied on with NUI cursor not enabled, if it works with raw input but doesn’t with Windows mode that can’t be fixed since the game requires the cursor to be reset to center for Windows mode to work, but the script is wrong for relying on that instead of the game’s stick/mouse input control).

I see this particular script indeed uses this without actually using NUI and this is not intended to work indeed, it working with raw input instead is a bug, since GET_NUI_CURSOR_POSITION uses the Windows cursor data which is bypassed for raw input (and with NUI focus on) but is used by the game in Windows input mode.

→ not a FiveM bug, the script is doing something it shouldn’t

1 Like