Skip to content

Commit

Permalink
Assure gpu mode and refresh rate are set at startup
Browse files Browse the repository at this point in the history
  • Loading branch information
seerge committed Feb 20, 2023
1 parent 3778c25 commit 81a0019
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 4 additions & 0 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,10 @@ public static void Main()

settingsForm.SetStartupCheck(scheduler.IsScheduled());

bool isPlugged = (SystemInformation.PowerStatus.PowerLineStatus == PowerLineStatus.Online);
settingsForm.AutoGPUMode(isPlugged ? 1 : 0);
settingsForm.AutoScreen(isPlugged ? 1 : 0);

Application.Run();

}
Expand Down
3 changes: 0 additions & 3 deletions Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,6 @@ public void SetPerformanceMode(int PerformanceMode = ASUSWmi.PerformanceBalanced
}


Application.EnableVisualStyles();
Application.Run();

Program.config.setConfig("performance_mode", PerformanceMode);
try
{
Expand Down
Binary file removed null
Binary file not shown.

0 comments on commit 81a0019

Please sign in to comment.