diff --git a/Project-Aurora/Project-Aurora/Modules/Razer/ChromaInstallationUtils.cs b/Project-Aurora/Project-Aurora/Modules/Razer/ChromaInstallationUtils.cs index 120cb0a81..10f05ddd6 100644 --- a/Project-Aurora/Project-Aurora/Modules/Razer/ChromaInstallationUtils.cs +++ b/Project-Aurora/Project-Aurora/Modules/Razer/ChromaInstallationUtils.cs @@ -31,6 +31,9 @@ public static class ChromaInstallationUtils """; + private const string RazerChromaSdkServer = "Razer Chroma SDK Server"; + private const string RazerChromaStreamServer = "Razer Chroma Stream Server"; + public static async Task UninstallAsync() => await Task.Run(() => { if (RzHelper.GetSdkVersion() == new RzSdkVersion()) @@ -172,13 +175,13 @@ public static void RestoreDeviceControl() var chromaPath = GetChromaPath(); if (chromaPath != null) { - File.Delete(chromaPath); + File.Delete(Path.Combine(chromaPath, DevicesXml)); } var chromaPath64 = GetChromaPath64(); if (chromaPath64 != null) { - File.Delete(chromaPath64); + File.Delete(Path.Combine(chromaPath64, DevicesXml)); } RestartChromaService(); } @@ -218,8 +221,8 @@ private static void ReplaceDevicesXml(List tasks, string? chromaPath) public static void DisableChromaBloat() { - DisableService("Razer Chroma SDK Server"); - DisableService("Razer Chroma Stream Server"); + DisableService(RazerChromaSdkServer); + DisableService(RazerChromaStreamServer); } private static void DisableService(string serviceName) diff --git a/Project-Aurora/Project-Aurora/Settings/Controls/Control_SettingsDevicesAndWrappers.xaml.cs b/Project-Aurora/Project-Aurora/Settings/Controls/Control_SettingsDevicesAndWrappers.xaml.cs index 53315c1c7..3fd97962f 100644 --- a/Project-Aurora/Project-Aurora/Settings/Controls/Control_SettingsDevicesAndWrappers.xaml.cs +++ b/Project-Aurora/Project-Aurora/Settings/Controls/Control_SettingsDevicesAndWrappers.xaml.cs @@ -90,11 +90,14 @@ private void UpdateChromaStatus(ChromaReader? chromaReader) ChromaConnectionStatusLabel.Content = "Failure"; ChromaConnectionStatusLabel.Foreground = new SolidColorBrush(Colors.PaleVioletRed); ChromaDisableDeviceControlButton.IsEnabled = false; + ChromaInstallButton.IsEnabled = true; return; } ChromaConnectionStatusLabel.Content = "Success"; ChromaConnectionStatusLabel.Foreground = new SolidColorBrush(Colors.LightGreen); + ChromaDisableDeviceControlButton.IsEnabled = true; + ChromaInstallButton.IsEnabled = false; var currentApp = RzHelper.CurrentAppExecutable; var currentAppId = RzHelper.CurrentAppId;