Ranges right converted to short or byte value in gamepad code