Dinput is bugged?
Trying to use my mouse's side buttons, enabling Dinput is required. Dinput is fucked for me, it makes my view stuck to looking up at the ceiling, you can't move your view, it's broken, something weird is happening when Dinput is enabled. When turned off mouse works fine except the side buttons don't function. Anybody familiar with this?
Comments
I FIGURED IT OUT! Right click the Tribes executable to open properties, go to compatibility tab and click Change High DPI settings. Check Override high DPI scaling behavior and select application. Dinput now works! I CAN USE MY MOUSE'S SIDE BUTTONS! YAAAAAAAY!!!
Sooo, the thing to know about mixing dinput mouse control and Windows DPI scaling is that there's an issue with how Microsoft is handling adjusting mouse data for different screen DPIs on unaware apps in their DirectInput code for this older interface. The mouse movement the game is receiving comes in the wrong format, and the game doesn't know what to do with it.
Basically, on initialization, the game creates the dinput mouse device, and explicitly tells directinput that it wants to receive relative data (-1, +1, etc) from the axes. Trouble is, with the DWM display scaling active on a DPI-unaware application, this instruction is for whatever reason ignored and absolute data (scale-adjusted virtual screen coordinates) is sent to the game, but only when the cursor is traversing a display scaled above 100%. That is, if locked in the window on a scaled display it gets absolute data, but if the cursor were able to move freely out of the window onto a display that isn't being scaled, it'll start receiving the expected relative mode data while anywhere that display. Weird, right? Weirder still: relative is the default mode for dinput mouse axis data, it's what the device itself is actually signalling − if you wanted absolute data to be created, you had to ask for it... which the game absolutely does not.
Anyways, yes, disabling DPI scaling will restore it back to normal relative-data behaviour. I do have a script/patch or two I wrote while investigating this issue a while back that I might be able to dig out if you do want to play with naive scaling on, but they were a bit rough, so it might take some tidying.
Daaamn ok thanks for the information yo.