Skip to main content

Set Gamepad Status (SetGamepadStatus)

PC
支持于:LI PASS V1.17.01
如果您使用的是 Unreal Engine,请参见 Unreal Engine SDK 的 SetGamepadStatus。

Update the gamepad status in LI PASS, called when the gamepad link status changes.

Function definition​

public static int SetGamepadStatus(ELIGamepadStatus gamepadStatus)

Parameter Instructions​

ParameterTypeExplanation
gamepadStatusELIGamepadStatusType of gamepad. 'None' indicates no gamepad is connected or the connection is broken. See gamepadStatus for details.

Code Sample​

LevelInfinite.SetGamepadStatus(LevelInfinite.ELIGamepadStatus.Xbox);

gamepadStatus​

ValueExplanation
NoneNo gamepad connected or gamepad connection broken
XboxXbox gamepad connected
PlayStationPlayStation gamepad connected
SwitchSwitch gamepad connected

Interface Sample​

gamepadStatus = Xbox

Image: SetGamepadStatus

gamepadStatus = PlayStation

Image: SetGamepadStatus