citizenfx / fivem

The source code for the Cfx.re modification frameworks, such as FiveM, RedM and LibertyM, as well as FXServer.
https://cfx.re/
3.57k stars 2.12k forks source link

DirectInput mouse mode doesn't get affected by UI focus #1010

Open blattersturm opened 3 years ago

blattersturm commented 3 years ago

Since this doesn't use either WM_INPUT or WM_MOUSE*, it doesn't get handled by current focus hooks, leading to common mentions of 'only one user is having this, but any time UI shows up the user can still move their camera'.

Xenknight61 commented 3 years ago

Mouse mode in this video: Raw Input https://streamable.com/vb759m

Mouse mode in this video: DirectInput https://streamable.com/o3vr1f

As I showed above, there is a bug in Raw Input DirectInput is not a problem, but people using Raw Input have this problem If he has a gun in his hand, there are problems like he fires automatically. I am using this function "SetNuiFocusKeepInput" when it comes in Input section

I don't know if it has something to do with the problem you mentioned above.

bluenzzz commented 8 months ago

just remove the direct input option in the fivem mouse configuration