示例#1
0
        public override bool Initialize()
        {
            CUE.PerformProtocolHandshake();
            var error = CUE.GetLastError();

            if (error != CorsairError.Success)
            {
                LogError("Corsair Error: " + error);
                return(isInitialized = false);
            }

            for (int i = 0; i < CUE.GetDeviceCount(); i++)
            {
                deviceInfos.Add(CUE.GetDeviceInfo(i));
            }

            if (!CUE.RequestControl())
            {
                LogError("Error requesting cuesdk exclusive control:" + CUE.GetLastError());
                return(isInitialized = false);
            }

            return(isInitialized = true);
        }