Constructor MaaGamepadController
- Namespace
- MaaFramework.Binding
- Assembly
- MaaFramework.Binding.Native.dll
MaaGamepadController(GamepadType, DesktopWindowInfo?, LinkOption, CheckStatusOption)
Creates a MaaFramework.Binding.MaaGamepadController instance.
public MaaGamepadController(GamepadType gamepadType, DesktopWindowInfo? info = null, LinkOption link = LinkOption.Start, CheckStatusOption check = CheckStatusOption.ThrowIfNotSucceeded)Parameters
gamepadTypeGamepadType-
The type of virtual gamepad.
infoDesktopWindowInfo?-
The desktop window info (null if screencap not needed).
linkLinkOption-
Executes MaaFramework.Binding.IMaaController.LinkStart if MaaFramework.Binding.LinkOption.Start; otherwise, not link.
checkCheckStatusOption-
Checks LinkStart().Wait() status if MaaFramework.Binding.CheckStatusOption.ThrowIfNotSucceeded; otherwise, not check.
Remarks
Wrapper of MaaFramework.Binding.Interop.Native.MaaController.MaaGamepadControllerCreate(System.IntPtr,System.UInt64,System.UInt64).
Exceptions
MaaGamepadController(nint, GamepadType, Win32ScreencapMethod, LinkOption, CheckStatusOption)
Creates a MaaFramework.Binding.MaaGamepadController instance.
public MaaGamepadController(nint hWnd, GamepadType gamepadType, Win32ScreencapMethod screencapMethod, LinkOption link = LinkOption.Start, CheckStatusOption check = CheckStatusOption.ThrowIfNotSucceeded)Parameters
hWndnint-
Window handle for screencap (optional, can be System.IntPtr.Zero if screencap not needed).
gamepadTypeGamepadType-
Type of virtual gamepad (MaaFramework.Binding.GamepadType.Xbox360 or MaaFramework.Binding.GamepadType.DualShock4).
screencapMethodWin32ScreencapMethod-
Win32 screencap method to use. Ignored if hWnd is System.IntPtr.Zero.
linkLinkOption-
Executes MaaFramework.Binding.IMaaController.LinkStart if MaaFramework.Binding.LinkOption.Start; otherwise, not link.
checkCheckStatusOption-
Checks LinkStart().Wait() status if MaaFramework.Binding.CheckStatusOption.ThrowIfNotSucceeded; otherwise, not check.
Remarks
Wrapper of MaaFramework.Binding.Interop.Native.MaaController.MaaGamepadControllerCreate(System.IntPtr,System.UInt64,System.UInt64).