Skip to content

Commit

Permalink
fix Aurora window not opening if Chroma was not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
Aytackydln committed May 22, 2024
1 parent 1b97d0e commit 9a80d01
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Project-Aurora/Project-Aurora/Modules/RazerSdkModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ public sealed class RazerSdkModule : AuroraModule
protected override async Task Initialize()
{
Global.logger.Information("Loading RazerSdkManager");

var auroraChromaSettings = await ConfigManager.LoadChromaConfig();
var razerSdkManager = new ChromaSdkManager(auroraChromaSettings);
await razerSdkManager.Initialize();
RzSdkManagerTaskSource.SetResult(razerSdkManager);

if (!RzHelper.IsSdkVersionSupported(RzHelper.GetSdkVersion()))
{
Global.logger.Warning("Currently installed razer sdk version \"{RzVersion}\" is not supported by the RazerSdkManager!", RzHelper.GetSdkVersion());
Expand All @@ -32,11 +38,6 @@ protected override async Task Initialize()
Global.logger.Error(e, "Error disabling device control automatically");
}
}

var auroraChromaSettings = await ConfigManager.LoadChromaConfig();
var razerSdkManager = new ChromaSdkManager(auroraChromaSettings);
await razerSdkManager.Initialize();
RzSdkManagerTaskSource.SetResult(razerSdkManager);
}

public override async ValueTask DisposeAsync()
Expand Down

0 comments on commit 9a80d01

Please sign in to comment.