Exemple #1
0
        private void DisableHidGuardian()
        {
            HidGuardian.RemoveDeviceFromAffectedList(XiaomiGamepadHardwareId);
            HidGuardian.RemoveFromWhitelist(Process.GetCurrentProcess().Id);

            // Disable and reenable the device to let the driver hide the emulated gamepad and show the HID one again
            DeviceStateManager.DisableReEnableDevice(XiaomiGamepadHardwareId);
        }
Exemple #2
0
        private void EnableHidGuardian()
        {
            // Temp
            HidGuardian.ClearWhitelistedProcesses();
            HidGuardian.ClearAffectedDevices();

            HidGuardian.AddDeviceToAffectedList(XiaomiGamepadHardwareId);
            HidGuardian.AddToWhitelist(Process.GetCurrentProcess().Id);

            // Disable and reenable the device to let the driver hide the HID gamepad and show Xbox360 one
            DeviceStateManager.DisableReEnableDevice(XiaomiGamepadHardwareId);
        }