Source-1-Games icon indicating copy to clipboard operation
Source-1-Games copied to clipboard

[CS:S] m_rawinput can't be disabled

Open RodsonMatos opened this issue 10 months ago • 12 comments

I use the OS mouse accel implementation (Arch Linux with Hyprland) and was setting m_rawinput to 0 before the update. Now the option resets to 1 whenever I move the mouse. I don't know if it's an intentional feature.

https://github.com/user-attachments/assets/fdb8af7d-db32-4860-b1cd-2d06d813bcb8

RodsonMatos avatar Feb 23 '25 20:02 RodsonMatos

When TF2's 64-bit released it hid the setting but didn't disable the convar: https://wiki.teamfortress.com/wiki/April_18,_2024_Patch

It's probably not intentional that it resets if it doesn't happen in TF2

JoriKos avatar Feb 23 '25 23:02 JoriKos

m_rawinput is forced to be ON because without it mouse input feels very bad on XWayland.

However, it should not get reset more than once, as dictated by m_rawinput_onetime_reset (not sure if this same ConVar exists in CSS).

Tiagoquix avatar Feb 24 '25 06:02 Tiagoquix

(not sure if this same ConVar exists in CSS).

It doesn't exist

RodsonMatos avatar Feb 24 '25 16:02 RodsonMatos

When TF2's 64-bit released it hid the setting

The raw input setting is hidden on linux only

RiverHornet3209 avatar Feb 24 '25 20:02 RiverHornet3209

(not sure if this same ConVar exists in CSS).

It doesn't exist

It does, it's hidden See https://github.com/ValveSoftware/source-sdk-2013/blob/master/src/game/client/in_mouse.cpp#L106

Image

PiMoNFeeD avatar Feb 24 '25 22:02 PiMoNFeeD

(not sure if this same ConVar exists in CSS).

It doesn't exist

It does, it's hidden See https://github.com/ValveSoftware/source-sdk-2013/blob/master/src/game/client/in_mouse.cpp#L106

Image

thanks. I'll try.

RodsonMatos avatar Feb 25 '25 00:02 RodsonMatos

Image

No difference, it still reverts to 1 (or I don't know how to use)

RodsonMatos avatar Feb 25 '25 01:02 RodsonMatos

As I understand it:

m_rawinput default value is 1.

m_rawinput_onetime_reset kicks-in once to set your m_rawinput to 1, because the previous default was 0 (so it makes sure everyone has Raw Input ON). After resetting it once, m_rawinput_onetime_reset sets itself to 1 to prevent further resets to m_rawinput.

At least, that's what the logic should be. Maybe it only applies to Windows and on Linux is forced to 1 everytime due to bugs (it's even hidden in the settings on Linux, so it must be for a good reason). However, I believe the logic is the same for both OSes.

Trust me, you want to play with Raw Input ON. It's horrible if you play with it off.

If you're wondering about your sensitivity: the SDL2 library was updated on the Linux ports of Source 1 games, fixing a bug that actually made your sensitivity the double of the rate it should be. To fix it, just divide your sensitivity by 2. If needed, also adjust your sensitivty a bit more to compensate for Raw Input.

Recommendation: also disable mouse acceleration on Windows. See https://youtu.be/tt8x4PMvZUg?t=45.

Reference about Raw Input logic: https://github.com/ValveSoftware/source-sdk-2013/blob/0759e2e8e179d5352d81d0d4aaded72c1704b7a9/src/game/client/in_mouse.cpp#L105-L125

Tiagoquix avatar Feb 25 '25 03:02 Tiagoquix

Trust me, you want to play with Raw Input ON. It's horrible if you play with it off.

You didn't understand. I USE mouse accel and for that to work properly m_rawinput has to be set to 0.

RodsonMatos avatar Feb 25 '25 16:02 RodsonMatos

Sure, then m_rawinput should not get reset more than once as per the onetime reset ConVar.

However, if it still is reset everytime for some reason, and if you really need to set it to 0, you can add +m_rawinput 0 to your launch options or m_rawinput 0 to your autoexec.cfg.

Tiagoquix avatar Feb 25 '25 20:02 Tiagoquix

Sure, then m_rawinput should not get reset more than once as per the onetime reset ConVar.

However, if it still is reset everytime for some reason, and if you really need to set it to 0, you can add +m_rawinput 0 to your launch options or m_rawinput 0 to your autoexec.cfg.

I already did that, it might be a bug.

RodsonMatos avatar Feb 25 '25 20:02 RodsonMatos

Using LD_PRELOAD="" %command% in launch options and then typing m_rawinput = 0 (only after opening the game) makes possible to use mouse accel although m_rawinput still reverts to 1.

Maybe Steam Overlay can help with something. I don't know.

RodsonMatos avatar May 25 '25 16:05 RodsonMatos

Is your config.cfg set to read-only / does your user have correct access to it? I think something is not being properly saved here.

Tiagoquix avatar Jul 02 '25 19:07 Tiagoquix

Is your config.cfg set to read-only / does your user have correct access to it? I think something is not being properly saved here.

It's set to read and write

RodsonMatos avatar Jul 02 '25 21:07 RodsonMatos

Not only that, if I try adding the command to the config.cfg it get erased after opening the game.

RodsonMatos avatar Jul 02 '25 23:07 RodsonMatos