XITRIX / Moonlight-Switch

Moonlight port for Nintendo Switch
770 stars 47 forks source link

Forced Mouse Acceleration #135

Open BobsYurUncle opened 4 months ago

BobsYurUncle commented 4 months ago

Would it be possible to disable mouse acceleration and send raw mouse input?

Small mouse movements are ignored and fast ones are clamped with seemingly no option to disable completely.

XITRIX commented 4 months ago

Check this one, please

BobsYurUncle commented 4 months ago

Check this one, please

I did not perceive any changes with this build in regards to mouse acceleration. Still present.

XITRIX commented 4 months ago

I have no idea about which acceleration you are talking about, make a video pls, or instructions how to reproduce, I have no problems with mouse at all

BobsYurUncle commented 4 months ago

mouse acceleration/smoothing is a way of averaging out mouse movements and can result in sluggish mouse movements. It is not necessarily a bad thing, Windows applies some mouse acceleration by default for cursor movement on the desktop with an option called "enhanced pointer precision".

It is, however, usually a bad thing to have on when playing games. If your mouse is controlling the game camera, it will smoothly ease in/out movements instead of moving 1:1 with your arm.

A side effect of this is that small mouse movements will be completely ignored. Try moving your mouse as slowly as you can directly on your computer, and through Moonlight-Switch. Your computer should slowly move the mouse cursor, no matter how slowly you go. Moonlight-Switch however will completely ignore smaller mouse movements.

The opposite is also true. Fast mouse movements will only be limited by your mouse sensor typically, but in Moonlight-Switch it will impose an arbitrary speed limit on your mouse movements. The result of this acceleration can only be described as a feeling of dragging your mouse through mud.

I have tried with two mice and this added mouse acceleration was present on both. There's even an option listed in the apps settings that lets you supposedly adjust how much is applied, but it does not go lower that 0.5x or allow raw mouse input.

Hopefully I have described this in a way easy to understand and how to reproduce. If you do not notice or are unbothered by it then it is a subjective issue that may not affect others either. I just find it very apparent and it is preventing me from using USB mice in the app.

BobsYurUncle commented 4 months ago

Update: I just noticed that the mouse acceleration slider was acting in an unexpected way.

Setting mouse acceleration to 0.5x is actually increasing the amount of smoothing/acceleration and causing the issues I mentioned above.

Adjusting the setting to 2.0x actually results in a much closer feeling to the native mouse controls by reducing it. Small mouse movements are no longer being ignored and it is largely usable.

There is still a slight amount of undesired smoothing being applied but it is much better overall. I suggest setting your acceleration setting to 0.5x so you can understand what I am talking about as it should be very obvious. A raw mouse input signal is still desired but at least it is usable at higher values.

XITRIX commented 4 months ago

Ooook, now it makes a bit sense. App do not make anything with mouse input, it takes raw movement, multiplies it on modifier from settings and sends it to Server. I always used it with x1 multiplier, so I had raw mouse events. Maybe multiplication causes uneven movement, I'll check it, but I'm not sure if I'm able to do anything with it