mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Added a check to all Corsair-DeviceProviders to prevent loading time if the CueSDK is initialized
This commit is contained in:
parent
841207225d
commit
a8f7edeaf5
@ -65,6 +65,10 @@ namespace Artemis.DeviceProviders.Corsair
|
||||
|
||||
private static bool CanInitializeSdk()
|
||||
{
|
||||
// This will skip the check-loop if the SDK is initialized
|
||||
if (CueSDK.IsInitialized)
|
||||
return CueSDK.IsSDKAvailable(CorsairDeviceType.Headset);
|
||||
|
||||
for (var tries = 0; tries < 9; tries++)
|
||||
{
|
||||
if (CueSDK.IsSDKAvailable(CorsairDeviceType.Headset))
|
||||
|
||||
@ -65,6 +65,10 @@ namespace Artemis.DeviceProviders.Corsair
|
||||
|
||||
private static bool CanInitializeSdk()
|
||||
{
|
||||
// This will skip the check-loop if the SDK is initialized
|
||||
if (CueSDK.IsInitialized)
|
||||
return CueSDK.IsSDKAvailable(CorsairDeviceType.Mouse);
|
||||
|
||||
for (var tries = 0; tries < 9; tries++)
|
||||
{
|
||||
if (CueSDK.IsSDKAvailable(CorsairDeviceType.Mouse))
|
||||
|
||||
@ -27,6 +27,10 @@ namespace Artemis.DeviceProviders.Corsair
|
||||
|
||||
public override bool CanEnable()
|
||||
{
|
||||
// This will skip the check-loop if the SDK is initialized
|
||||
if (CueSDK.IsInitialized)
|
||||
return CueSDK.IsSDKAvailable(CorsairDeviceType.Keyboard);
|
||||
|
||||
for (var tries = 0; tries < 9; tries++)
|
||||
{
|
||||
if (CueSDK.IsSDKAvailable(CorsairDeviceType.Keyboard))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user