Table of Contents

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

gamepadType GamepadType

The type of virtual gamepad.

info DesktopWindowInfo?

The desktop window info (null if screencap not needed).

link LinkOption

Executes MaaFramework.Binding.IMaaController.LinkStart if MaaFramework.Binding.LinkOption.Start; otherwise, not link.

check CheckStatusOption

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

MaaJobStatusException

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

hWnd nint

Window handle for screencap (optional, can be System.IntPtr.Zero if screencap not needed).

gamepadType GamepadType

Type of virtual gamepad (MaaFramework.Binding.GamepadType.Xbox360 or MaaFramework.Binding.GamepadType.DualShock4).

screencapMethod Win32ScreencapMethod

Win32 screencap method to use. Ignored if hWnd is System.IntPtr.Zero.

link LinkOption

Executes MaaFramework.Binding.IMaaController.LinkStart if MaaFramework.Binding.LinkOption.Start; otherwise, not link.

check CheckStatusOption

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

MaaJobStatusException