Hello, my apologies if this question doesn’t belong here.
I’ve implemented gyro aiming in Yamagi Quake 2, using the awesome sensor reading capabilities of SDL2. It was something natural to add, since Yamagi already used SDL2 Game Controller for input. The meat of the implementation is in this file: sdl.c
Yet, I have a couple of issues on how it behaves in different plaforms:
In Ubuntu 20.04, the DualShock 4 controller works wired and wireless without problems. However, in Windows 7 and Mac OS High Sierra, the controller’s gyro is only detected when wired. Funnily enough, if Steam is started, closed, and then yquake2 is run, the gyro is recognized and works perfectly; this happens in both platforms. Surely, I have something missing from my initialization, but shouldn’t code on all platforms be and work the same? (Line 1535 in the link above).
The Switch Pro Controller works wired and wireless on all platforms, but readings are inconsistent: while on Windows it gives the same readings as the DualShock 4, in Linux and Mac numbers are bigger, which forces me to decrease sensitivity to keep consistency of movement. I’m not an expert on rotational movement, but surely one of the versions is wrong. (Line 1540 on the link above).
Any help with either one is appreciated.