mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Improved dimming
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Runtime.InteropServices;
|
||||
using GHelper.Helpers;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace GHelper.Display
|
||||
{
|
||||
@@ -31,10 +32,16 @@ namespace GHelper.Display
|
||||
if (brightness >= 0) AppConfig.Set("brightness", brightness);
|
||||
else brightness = AppConfig.Get("brightness");
|
||||
|
||||
if (brightness >= 0) SetGamma(brightness);
|
||||
if (brightness >= 0) Task.Run(() =>
|
||||
{
|
||||
//Logger.WriteLine($"Brightness: {brightness}");
|
||||
var splendid = Environment.SystemDirectory + "\\DriverStore\\FileRepository\\asussci2.inf_amd64_f2eed2fae3b45a67\\ASUSOptimization\\AsusSplendid.exe";
|
||||
ProcessHelper.RunCMD(splendid, (AppConfig.IsROG() ? 19 : 9) + " 0 " + (40 + brightness * 0.6));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void SetGamma(int brightness = 100)
|
||||
{
|
||||
var bright = Math.Round((float)brightness / 200 + 0.5, 2);
|
||||
|
||||
Reference in New Issue
Block a user