Removed ACPI requirement for non-asus models https://github.com/seerge/g-helper/issues/1676

This commit is contained in:
Serge
2023-12-03 12:17:07 +01:00
parent 013c83fd60
commit 84c7fdb3bf
3 changed files with 41 additions and 27 deletions

View File

@@ -64,11 +64,12 @@ namespace GHelper
ProcessHelper.CheckAlreadyRunning();
try
{
acpi = new AsusACPI();
}
catch
Logger.WriteLine("------------");
Logger.WriteLine("App launched: " + AppConfig.GetModel() + " :" + Assembly.GetExecutingAssembly().GetName().Version.ToString() + CultureInfo.CurrentUICulture + (ProcessHelper.IsUserAdministrator() ? "." : ""));
acpi = new AsusACPI();
if (!acpi.IsConnected() && AppConfig.IsASUS())
{
DialogResult dialogResult = MessageBox.Show(Properties.Strings.ACPIError, Properties.Strings.StartupError, MessageBoxButtons.YesNo);
if (dialogResult == DialogResult.Yes)
@@ -80,9 +81,6 @@ namespace GHelper
return;
}
Logger.WriteLine("------------");
Logger.WriteLine("App launched: " + AppConfig.GetModel() + " :" + Assembly.GetExecutingAssembly().GetName().Version.ToString() + CultureInfo.CurrentUICulture + (ProcessHelper.IsUserAdministrator() ? "." : ""));
Application.EnableVisualStyles();
HardwareControl.RecreateGpuControl();
@@ -154,6 +152,7 @@ namespace GHelper
}
private static void SystemEvents_SessionEnding(object sender, SessionEndingEventArgs e)
{
gpuControl.StandardModeFix();