06-29-2024, 03:50 AM -
I've got the basic idea functioning. On my wired Xbox One controller (evdev) I have mapped the left stick X to sixaxis X and Y to sixaxis Y!
But I am not exactly a mathematician, and I also don't have "control" values (ie I don't know what "usual" SIXAXIS values look like) and so my math is clearly very jank.
As for where I am right now, I added the following lines to rpcs3/Input/evdev_joystick_handler.cpp after L1221:
pad->m_sensors[0].m_value = Clamp0To1023(512 + (lx - 127.5f) * 4.016f);
pad->m_sensors[1].m_value = Clamp0To1023(512 + (ly - 127.5f) * 4.016f);
If anyone has any tips as to how I can properly do this math, I would really appreciate it.
If people are interested in this rebindability being an actual feature instead of a hacked-in thing, I would be happy to try implementing it!