mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Backlight control fix
This commit is contained in:
@@ -262,8 +262,9 @@ namespace GHelper
|
||||
device.CloseDevice();
|
||||
}
|
||||
|
||||
|
||||
// Backup payload for old models
|
||||
if (AppConfig.ContainsModel("503"))
|
||||
{
|
||||
byte[] msgBackup = { INPUT_HID_ID, 0xba, 0xc5, 0xc4, (byte)brightness };
|
||||
|
||||
var devicesBackup = GetHidDevices(deviceIds, 0);
|
||||
@@ -275,6 +276,8 @@ namespace GHelper
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static void ApplyAuraPower(List<AuraDev19b6> flags)
|
||||
{
|
||||
|
||||
@@ -155,6 +155,7 @@ public static class HardwareControl
|
||||
if (_gpuControl.IsValid)
|
||||
{
|
||||
GpuControl = _gpuControl;
|
||||
Logger.WriteLine(GpuControl.FullName);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -164,11 +165,14 @@ public static class HardwareControl
|
||||
if (_gpuControl.IsValid)
|
||||
{
|
||||
GpuControl = _gpuControl;
|
||||
Logger.WriteLine(GpuControl.FullName);
|
||||
return;
|
||||
}
|
||||
_gpuControl.Dispose();
|
||||
|
||||
GpuControl = null;
|
||||
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -221,36 +221,6 @@ namespace GHelper
|
||||
|
||||
Padding padding = new Padding(15, 5, 5, 5);
|
||||
|
||||
/*
|
||||
TableLayoutPanel[] tables = { tablePerf, tableGPU };
|
||||
string[] titles = { Properties.Strings.PerformanceMode, Properties.Strings.GPUMode};
|
||||
|
||||
int index = 0;
|
||||
foreach (TableLayoutPanel table in tables)
|
||||
{
|
||||
|
||||
var title = new ToolStripMenuItem(titles[index]);
|
||||
title.Margin = padding;
|
||||
title.Enabled = false;
|
||||
contextMenuStrip.Items.Add(title);
|
||||
|
||||
foreach (Control control in table.Controls)
|
||||
{
|
||||
var button = control as RButton;
|
||||
if (button != null && !button.Secondary && button.Enabled)
|
||||
{
|
||||
var menu = new ToolStripMenuItem(button.Text);
|
||||
menu.Margin = padding;
|
||||
menu.Checked = button.Activated;
|
||||
menu.Click += delegate { button.PerformClick(); };
|
||||
contextMenuStrip.Items.Add(menu);
|
||||
}
|
||||
}
|
||||
contextMenuStrip.Items.Add("-");
|
||||
index++;
|
||||
}*/
|
||||
|
||||
|
||||
var title = new ToolStripMenuItem(Properties.Strings.PerformanceMode);
|
||||
title.Margin = padding;
|
||||
title.Enabled = false;
|
||||
|
||||
Reference in New Issue
Block a user