remove duplicated draw code
fix nil ref
convert from joystick to gamepad api