pub unsafe extern "C" fn MaaGamepadControllerCreate(
hWnd: *mut c_void,
gamepad_type: MaaGamepadType,
screencap_method: MaaWin32ScreencapMethod,
) -> *mut MaaControllerExpand description
@brief Create a virtual gamepad controller for Windows.
@param hWnd Window handle for screencap (optional, can be nullptr if screencap not needed). @param gamepad_type Type of virtual gamepad (MaaGamepadType_Xbox360 or MaaGamepadType_DualShock4). @param screencap_method Win32 screencap method to use. Ignored if hWnd is nullptr. @return The controller handle, or nullptr on failure.
@note Requires ViGEm Bus Driver to be installed on the system. @note For gamepad control, use: - click_key/key_down/key_up: For digital buttons (A, B, X, Y, LB, RB, etc.) See MaaGamepadButton_* constants for available buttons. - touch_down/touch_move/touch_up: For analog inputs (sticks and triggers) - contact 0 (MaaGamepadTouch_LeftStick): Left stick (x: -32768~32767, y: -32768~32767) - contact 1 (MaaGamepadTouch_RightStick): Right stick (x: -32768~32767, y: -32768~32767) - contact 2 (MaaGamepadTouch_LeftTrigger): Left trigger (pressure: 0~255, x/y ignored) - contact 3 (MaaGamepadTouch_RightTrigger): Right trigger (pressure: 0~255, x/y ignored) @note click and swipe are not directly supported for gamepad. @note input_text, start_app, stop_app, scroll are not supported. @see MaaGamepadButton, MaaGamepadTouch, MaaGamepadType