Compartir a través de


LegacyGipGameControllerProvider.FromGameControllerProvider Método

Definición

Construye un legacyGipGameControllerProvider para el proveedor de controlador especificado.

public:
 static LegacyGipGameControllerProvider ^ FromGameControllerProvider(IGameControllerProvider ^ provider);
 static LegacyGipGameControllerProvider FromGameControllerProvider(IGameControllerProvider const& provider);
public static LegacyGipGameControllerProvider FromGameControllerProvider(IGameControllerProvider provider);
function fromGameControllerProvider(provider)
Public Shared Function FromGameControllerProvider (provider As IGameControllerProvider) As LegacyGipGameControllerProvider

Parámetros

provider
IGameControllerProvider

Proveedor de controlador para el que se va a construir legacyGipGameControllerProvider.

Devoluciones

LegacyGipGameControllerProvider si el controlador es un controlador GIP (Protocolo de entrada de juegos). Null si el controlador no es un controlador GIP.

Ejemplos

public void SetupHeadset(IGameControllerProvider headsetProvider)
{
    LegacyGipGameControllerProvider legacyGipGameControllerProvider =
        LegacyGipGameControllerProvider.FromGameControllerProvider(headsetProvider);

    // Reset the device
    legacyGipGameControllerProvider.ExecuteCommand(DeviceCommand.Reset);

    // Check the smart mute level
    byte[] smartMuteBuffer =
        legacyGipGameControllerProvider.GetHeadsetOperation(HeadsetOperation.SmartMute);
    HeadsetLevel smartMuteValue = (HeadsetLevel)smartMuteBuffer[0];

    // Set bass boost to 3db
    byte[] bassBuffer = BitConverter.GetBytes((UInt32)3);
    legacyGipGameControllerProvider.SetHeadsetOperation(HeadsetOperation.BassBoostGain,
        bassBuffer);
}

Se aplica a

Consulte también