private void initialiseSdk(bool exclusiveLightingControl) { ProtocolDetails = CorsairLightingSDK.PerformProtocolHandshake(); if (ProtocolDetails.ServerProtocolVersion == 0) { if (!HandleError()) { //server not found... seep 10 seconds and try again Thread.Sleep(10000); initialiseSdk(exclusiveLightingControl); return; } } if (ProtocolDetails.BreakingChanges) { String sdkVersion = ProtocolDetails.SdkVersion; String cueVersion = ProtocolDetails.ServerVersion; throw new Exception("Incompatible SDK (" + sdkVersion + ") and CUE " + cueVersion + " versions."); } if (exclusiveLightingControl) { CorsairLightingSDK.RequestControl(CorsairAccessMode.ExclusiveLightingControl); HasExclusiveLightingControl = true; } }
/// <summary> /// Requests exclusive control over the provider /// </summary> public void RequestControl() { CorsairLightingSDK.RequestControl(CorsairAccessMode.ExclusiveLightingControl); }