Table of Contents

Method ToGamepadControllerWith

Namespace
MaaFramework.Binding
Assembly
MaaFramework.Binding.Native.dll

ToGamepadControllerWith(DesktopWindowInfo, GamepadType, Win32ScreencapMethod?, nint?, LinkOption, CheckStatusOption)

Converts a MaaFramework.Binding.DesktopWindowInfo to a MaaFramework.Binding.MaaGamepadController.

public static MaaGamepadController ToGamepadControllerWith(this DesktopWindowInfo info, GamepadType gamepadType, Win32ScreencapMethod? screencapMethod = null, nint? hWnd = null, LinkOption link = LinkOption.Start, CheckStatusOption check = CheckStatusOption.ThrowIfNotSucceeded)

Parameters

info DesktopWindowInfo

The DesktopWindowInfo.

gamepadType GamepadType

The type of virtual gamepad.

screencapMethod Win32ScreencapMethod?

The screencap method.

hWnd nint?

The new handle to a win32 window.

link LinkOption

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

check CheckStatusOption

Checks LinkStart().Wait() status if MaaFramework.Binding.CheckStatusOption.ThrowIfNotSucceeded; otherwise, not check.

Returns

MaaGamepadController

A MaaGamepadController.

Exceptions

ArgumentNullException