diff --git a/Project-Aurora/Aurora-Updater/Program.cs b/Project-Aurora/Aurora-Updater/Program.cs
index fa3239cfc..9c2053762 100755
--- a/Project-Aurora/Aurora-Updater/Program.cs
+++ b/Project-Aurora/Aurora-Updater/Program.cs
@@ -72,6 +72,10 @@ static void Main(string[] args)
return;
}
var versionToCheck = VersionParser.ParseVersion(fileVersion);
+ if (versionToCheck is { Major: 0, Minor: 0, Patch: 0 })
+ {
+ _isSilent = false;
+ }
var owner = FileVersionInfo.GetVersionInfo(auroraPath).CompanyName;
var repository = FileVersionInfo.GetVersionInfo(auroraPath).ProductName;
diff --git a/Project-Aurora/AuroraDeviceManager/AuroraDeviceManager.csproj b/Project-Aurora/AuroraDeviceManager/AuroraDeviceManager.csproj
index 5e9f1c02b..5c5ff8db6 100644
--- a/Project-Aurora/AuroraDeviceManager/AuroraDeviceManager.csproj
+++ b/Project-Aurora/AuroraDeviceManager/AuroraDeviceManager.csproj
@@ -124,6 +124,7 @@
+
diff --git a/Project-Aurora/AuroraDeviceManager/Devices/Creative/SoundBlasterXDevice.cs b/Project-Aurora/AuroraDeviceManager/Devices/Creative/SoundBlasterXDevice.cs
index f6288b5f4..cbb8c1de4 100644
--- a/Project-Aurora/AuroraDeviceManager/Devices/Creative/SoundBlasterXDevice.cs
+++ b/Project-Aurora/AuroraDeviceManager/Devices/Creative/SoundBlasterXDevice.cs
@@ -55,7 +55,7 @@ protected override Task DoInitialize(CancellationToken cancellationToken)
}
catch (Exception exc)
{
- Global.Logger.Error("There was an error scanning for SoundBlasterX devices", exc);
+ Global.Logger.Error(exc, "There was an error scanning for SoundBlasterX devices");
IsInitialized = false;
return Task.FromResult(false);
}
diff --git a/Project-Aurora/AuroraDeviceManager/Devices/UnifiedHID/UnifiedHIDDevice.cs b/Project-Aurora/AuroraDeviceManager/Devices/UnifiedHID/UnifiedHIDDevice.cs
index 8f82d7716..d61635ef4 100644
--- a/Project-Aurora/AuroraDeviceManager/Devices/UnifiedHID/UnifiedHIDDevice.cs
+++ b/Project-Aurora/AuroraDeviceManager/Devices/UnifiedHID/UnifiedHIDDevice.cs
@@ -67,7 +67,7 @@ protected override Task DoInitialize(CancellationToken cancellationToken)
}
catch (Exception e)
{
- Global.Logger.Error($"[UnifiedHID] device could not be initialized:", e);
+ Global.Logger.Error(e, $"[UnifiedHID] device could not be initialized");
}
return Task.FromResult(IsInitialized);
@@ -98,7 +98,7 @@ protected override Task Shutdown()
}
catch (Exception ex)
{
- Global.Logger.Error("[UnifiedHID] there was an error shutting down devices", ex);
+ Global.Logger.Error(ex, "[UnifiedHID] there was an error shutting down devices");
}
return Task.CompletedTask;
@@ -157,7 +157,7 @@ protected override Task UpdateDevice(Dictionary k
}
catch (Exception ex)
{
- Global.Logger.Error("[UnifiedHID] error when updating device:", ex);
+ Global.Logger.Error(ex, "[UnifiedHID] error when updating device:");
return Task.FromResult(false);
}
}
diff --git a/Project-Aurora/AuroraDeviceManager/Utils/ProcessUtils.cs b/Project-Aurora/AuroraDeviceManager/Utils/ProcessUtils.cs
index 95eb7b59c..2df00be8f 100644
--- a/Project-Aurora/AuroraDeviceManager/Utils/ProcessUtils.cs
+++ b/Project-Aurora/AuroraDeviceManager/Utils/ProcessUtils.cs
@@ -1,4 +1,7 @@
-using System.Diagnostics;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.IO;
+using System.ServiceProcess;
namespace AuroraDeviceManager.Utils;
@@ -6,7 +9,46 @@ public static class ProcessUtils
{
public static bool IsProcessRunning(string processName)
{
- var processesByName = Process.GetProcessesByName(processName);
- return processesByName.Length > 0;
+ if (string.IsNullOrWhiteSpace(processName))
+ {
+ return false;
+ }
+
+ var normalizedName = Path.GetFileNameWithoutExtension(processName).Trim();
+ if (string.IsNullOrEmpty(normalizedName))
+ {
+ normalizedName = processName.Trim();
+ }
+
+ try
+ {
+ var processesByName = Process.GetProcessesByName(normalizedName);
+ if (processesByName.Length > 0)
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // ignore and fall back to service lookup
+ }
+
+ try
+ {
+ using var service = new ServiceController(normalizedName);
+ return service.Status is ServiceControllerStatus.Running
+ or ServiceControllerStatus.StartPending
+ or ServiceControllerStatus.ContinuePending;
+ }
+ catch (InvalidOperationException)
+ {
+ // service not found
+ }
+ catch (Win32Exception)
+ {
+ // access denied or service not accessible
+ }
+
+ return false;
}
}
\ No newline at end of file
diff --git a/Project-Aurora/MemoryAccessProfiles/PluginMain.cs b/Project-Aurora/MemoryAccessProfiles/PluginMain.cs
index 04ab8e414..651811291 100644
--- a/Project-Aurora/MemoryAccessProfiles/PluginMain.cs
+++ b/Project-Aurora/MemoryAccessProfiles/PluginMain.cs
@@ -1,4 +1,5 @@
-using AuroraRgb.Profiles;
+using AuroraRgb.EffectsEngine;
+using AuroraRgb.Profiles;
using AuroraRgb.Settings;
using MemoryAccessProfiles.Profiles.Borderlands2;
using MemoryAccessProfiles.Profiles.CloneHero;
@@ -36,6 +37,6 @@ public void ProcessManager(object manager)
// Register all Application types in the assembly
foreach (var inst in profiles)
- lightingStateManager.RegisterEvent(inst);
+ lightingStateManager.ApplicationManager.RegisterEvent(inst);
}
}
\ No newline at end of file
diff --git a/Project-Aurora/MemoryAccessProfiles/Profiles/Borderlands2/Borderlands2Profile.cs b/Project-Aurora/MemoryAccessProfiles/Profiles/Borderlands2/Borderlands2Profile.cs
index 4c33efc88..f4094372a 100644
--- a/Project-Aurora/MemoryAccessProfiles/Profiles/Borderlands2/Borderlands2Profile.cs
+++ b/Project-Aurora/MemoryAccessProfiles/Profiles/Borderlands2/Borderlands2Profile.cs
@@ -1,5 +1,5 @@
using System.Drawing;
-using AuroraRgb.Profiles;
+using AuroraRgb.EffectsEngine;
using AuroraRgb.Settings;
using AuroraRgb.Settings.Layers;
using Common.Devices;
diff --git a/Project-Aurora/MemoryAccessProfiles/Profiles/Dishonored/DishonoredProfile.cs b/Project-Aurora/MemoryAccessProfiles/Profiles/Dishonored/DishonoredProfile.cs
index bc0c297fb..1e4cf73b3 100644
--- a/Project-Aurora/MemoryAccessProfiles/Profiles/Dishonored/DishonoredProfile.cs
+++ b/Project-Aurora/MemoryAccessProfiles/Profiles/Dishonored/DishonoredProfile.cs
@@ -1,5 +1,5 @@
using System.Drawing;
-using AuroraRgb.Profiles;
+using AuroraRgb.EffectsEngine;
using AuroraRgb.Settings;
using AuroraRgb.Settings.Layers;
using Common.Devices;
diff --git a/Project-Aurora/Project-Aurora/AuroraApp.cs b/Project-Aurora/Project-Aurora/AuroraApp.cs
index 00ead1d64..cb03f6fb9 100644
--- a/Project-Aurora/Project-Aurora/AuroraApp.cs
+++ b/Project-Aurora/Project-Aurora/AuroraApp.cs
@@ -108,7 +108,7 @@ public async Task OnStartup()
}
var lsm = await LightingStateManagerModule.LightningStateManager;
- lsm.InitializeApps();
+ lsm.ApplicationManager.InitializeApps();
//Debug Windows on Startup
if (Global.Configuration.BitmapWindowOnStartUp)
diff --git a/Project-Aurora/Project-Aurora/ConfigUi.xaml.cs b/Project-Aurora/Project-Aurora/ConfigUi.xaml.cs
index 46f340b4d..ef7406e5f 100755
--- a/Project-Aurora/Project-Aurora/ConfigUi.xaml.cs
+++ b/Project-Aurora/Project-Aurora/ConfigUi.xaml.cs
@@ -86,7 +86,7 @@ public Application? FocusedApplication
set
{
SetValue(FocusedApplicationProperty, value);
- _lightingStateManager.Result.PreviewProfileKey = value != null ? value.Config.ID : string.Empty;
+ _lightingStateManager.Result.ApplicationManager.PreviewProfileKey = value != null ? value.Config.ID : string.Empty;
}
}
@@ -448,7 +448,7 @@ private async Task Window_ClosingAsync(Application? focusedApp)
}
var lightingStateManager = await _lightingStateManager;
- lightingStateManager.PreviewProfileKey = string.Empty;
+ lightingStateManager.ApplicationManager.PreviewProfileKey = string.Empty;
switch (Global.Configuration.CloseMode)
{
diff --git a/Project-Aurora/Project-Aurora/Control_ProfilesStack.xaml.cs b/Project-Aurora/Project-Aurora/Control_ProfilesStack.xaml.cs
index 0aea1ee65..dd3a6bc4f 100644
--- a/Project-Aurora/Project-Aurora/Control_ProfilesStack.xaml.cs
+++ b/Project-Aurora/Project-Aurora/Control_ProfilesStack.xaml.cs
@@ -10,6 +10,7 @@
using System.Windows.Input;
using System.Windows.Media.Imaging;
using System.Windows.Threading;
+using AuroraRgb.EffectsEngine;
using AuroraRgb.Modules.GameStateListen;
using AuroraRgb.Profiles;
using AuroraRgb.Profiles.Generic_Application;
@@ -85,8 +86,8 @@ private async Task GenerateProfileStack(string focusedKey)
var lightingStateManager = await _lightingStateManager;
var profileLoadTasks = Global.Configuration.ProfileOrder
- .Where(profileName => lightingStateManager.Events.ContainsKey(profileName))
- .Select(profileName => lightingStateManager.Events[profileName])
+ .Where(profileName => lightingStateManager.ApplicationManager.Events.ContainsKey(profileName))
+ .Select(profileName => lightingStateManager.ApplicationManager.Events[profileName])
.OrderBy(item => item.Settings is { Hidden: false } ? 0 : 1)
.Select(application => InsertApplicationImage(focusedKey, application, focusedSetTaskCompletion, cancellationToken))
.Select(x => x.Task);
@@ -145,7 +146,7 @@ private async Task RemoveApplication(Application application)
var name = application.Config.ID;
var lightingStateManager = await _lightingStateManager;
- if (!lightingStateManager.Events.TryGetValue(name, out var value)) return;
+ if (!lightingStateManager.ApplicationManager.Events.TryGetValue(name, out var value)) return;
var applicationName = value.Config.ProcessNames[0];
var cancelled = MessageBox.Show(
@@ -153,7 +154,7 @@ private async Task RemoveApplication(Application application)
MessageBoxButton.YesNo, MessageBoxImage.Warning) != MessageBoxResult.Yes;
if (cancelled) return;
- lightingStateManager.RemoveGenericProfile(name);
+ lightingStateManager.ApplicationManager.RemoveGenericProfile(name);
Dispatcher.InvokeAsync(async () => await GenerateProfileStack());
}
@@ -167,7 +168,7 @@ private async void AddProfile_MouseDown(object? sender, MouseButtonEventArgs e)
var filename = Path.GetFileName(dialog.ChosenExecutablePath.ToLowerInvariant());
var lightingStateManager = await _lightingStateManager;
- if (lightingStateManager.Events.ContainsKey(filename))
+ if (lightingStateManager.ApplicationManager.Events.ContainsKey(filename))
{
MessageBox.Show("Profile for this application already exists.");
return;
@@ -188,7 +189,7 @@ private async void AddProfile_MouseDown(object? sender, MouseButtonEventArgs e)
ico.Dispose();
- await lightingStateManager.RegisterEvent(genAppPm);
+ await lightingStateManager.ApplicationManager.RegisterEvent(genAppPm);
await ConfigManager.SaveAsync(Global.Configuration);
await GenerateProfileStack(filename);
}
@@ -247,12 +248,12 @@ private void ContextMenu_Opened(object? sender, RoutedEventArgs e)
private async void Control_ProfilesStack_OnLoaded(object sender, RoutedEventArgs e)
{
- (await _lightingStateManager).EventAdded += LightingStateManagerOnEventAdded;
+ (await _lightingStateManager).ApplicationManager.EventAdded += LightingStateManagerOnEventAdded;
}
private async void Control_ProfilesStack_OnUnloaded(object sender, RoutedEventArgs e)
{
- (await _lightingStateManager).EventAdded -= LightingStateManagerOnEventAdded;
+ (await _lightingStateManager).ApplicationManager.EventAdded -= LightingStateManagerOnEventAdded;
}
private void FocusApplication(Application application)
diff --git a/Project-Aurora/Project-Aurora/Controls/EffectSettingsWindow.xaml.cs b/Project-Aurora/Project-Aurora/Controls/EffectSettingsWindow.xaml.cs
index 894dabcb1..02f49e56a 100644
--- a/Project-Aurora/Project-Aurora/Controls/EffectSettingsWindow.xaml.cs
+++ b/Project-Aurora/Project-Aurora/Controls/EffectSettingsWindow.xaml.cs
@@ -55,7 +55,7 @@ public EffectSettingsWindow(LayerEffectConfig EffectConfig)
}
catch(Exception exc)
{
- Global.logger.Error("Could not set brush:", exc);
+ Global.logger.Error(exc, "Could not set brush");
}
gradient_editor.BrushChanged += Gradient_editor_BrushChanged;
@@ -114,12 +114,12 @@ private void accept_button_Click(object? sender, RoutedEventArgs e)
private void Window_Activated(object? sender, EventArgs e)
{
- Global.LightingStateManager.PreviewProfileKey = preview_key;
+ Global.LightingStateManager.ApplicationManager.PreviewProfileKey = preview_key;
}
private void Window_Deactivated(object? sender, EventArgs e)
{
- Global.LightingStateManager.PreviewProfileKey = null;
+ Global.LightingStateManager.ApplicationManager.PreviewProfileKey = null;
}
private void effect_angle_ValueChanged(object? sender, RoutedPropertyChangedEventArgs