diff --git a/Project-Aurora/Project-Aurora/Devices/Asus/AsusDevice.cs b/Project-Aurora/Project-Aurora/Devices/Asus/AsusDevice.cs index ae4ca6bc8..73df19c99 100644 --- a/Project-Aurora/Project-Aurora/Devices/Asus/AsusDevice.cs +++ b/Project-Aurora/Project-Aurora/Devices/Asus/AsusDevice.cs @@ -51,7 +51,7 @@ public bool Initialize() { asusHandler?.Stop(); - asusHandler = new AsusHandler(); + asusHandler = new AsusHandler(Global.Configuration.VarRegistry.GetVariable($"{DeviceName}_enable_unsupported_version")); isActive = asusHandler.Start(); return isActive; } diff --git a/Project-Aurora/Project-Aurora/Devices/Asus/AsusHandler.cs b/Project-Aurora/Project-Aurora/Devices/Asus/AsusHandler.cs index e0c932564..80e6d5bbb 100644 --- a/Project-Aurora/Project-Aurora/Devices/Asus/AsusHandler.cs +++ b/Project-Aurora/Project-Aurora/Devices/Asus/AsusHandler.cs @@ -25,11 +25,11 @@ public class AsusHandler /// public bool HasSdk => AuraSdk != null; - public AsusHandler() + public AsusHandler(bool enableUnsupportedVersion = false) { try { - if (CheckVersion(out string message)) + if (CheckVersion(enableUnsupportedVersion, out string message)) AuraSdk = new AuraSdk() as IAuraSdk2; else AuraSdk = null; @@ -47,12 +47,10 @@ public AsusHandler() /// Checks to see if the version of Aura installed is the correct one /// /// true if the registry entry equals to - private bool CheckVersion(out string message) + private bool CheckVersion(bool enableUnsupportedVersion, out string message) { message = null; - - bool enableUnsupportedVersion = Global.Configuration.VarRegistry.GetVariable($"{DeviceName}_disconnect_when_stop"); - + //Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Asus\AURA\Version using (var root = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32)) { diff --git a/Project-Aurora/Project-Aurora/Devices/Asus/Config/AsusConfigWindow.xaml.cs b/Project-Aurora/Project-Aurora/Devices/Asus/Config/AsusConfigWindow.xaml.cs index 683fe1fdf..fb799955a 100644 --- a/Project-Aurora/Project-Aurora/Devices/Asus/Config/AsusConfigWindow.xaml.cs +++ b/Project-Aurora/Project-Aurora/Devices/Asus/Config/AsusConfigWindow.xaml.cs @@ -73,7 +73,7 @@ private void SaveConfigFile() private bool LoadAuraSdk() { - asusHandler = new AsusHandler(); + asusHandler = new AsusHandler(Global.Configuration.VarRegistry.GetVariable($"Asus_enable_unsupported_version")); asusHandler.AuraSdk?.SwitchMode(); if (asusHandler.HasSdk)