2018-11-11, 22:34
The function you need to modify is CGameClientInput::MapJoysticks(). Simply sort joysticks by time of last use. You will need to add this time parameter to the joystick object. I can help show where this should go and where it should be calculated.