mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Optimized USB-C fix
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
<AssemblyVersion>0.105</AssemblyVersion>
|
||||
<AssemblyVersion>0.106</AssemblyVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
|
||||
@@ -176,10 +176,14 @@ namespace GHelper.Gpu
|
||||
|
||||
public static bool IsPlugged()
|
||||
{
|
||||
bool optimizedUSBC = AppConfig.Get("optimized_usbc") != 1;
|
||||
if (SystemInformation.PowerStatus.PowerLineStatus != PowerLineStatus.Online) return false;
|
||||
if (!AppConfig.Is("optimized_usbc")) return true;
|
||||
|
||||
return SystemInformation.PowerStatus.PowerLineStatus == PowerLineStatus.Online &&
|
||||
(optimizedUSBC || Program.acpi.DeviceGet(AsusACPI.ChargerMode) < AsusACPI.ChargerUSB);
|
||||
int chargerMode = Program.acpi.DeviceGet(AsusACPI.ChargerMode);
|
||||
Logger.WriteLine("ChargerStatus: " + chargerMode);
|
||||
|
||||
if (chargerMode < 0) return true;
|
||||
return (chargerMode & AsusACPI.ChargerBarrel) > 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -436,7 +436,6 @@ namespace GHelper.Input
|
||||
KeyProcess("paddle");
|
||||
return;
|
||||
// The Command Center ("play-looking") button below the select key.
|
||||
// We'll call this M3.
|
||||
case 166:
|
||||
KeyProcess("cc");
|
||||
return;
|
||||
|
||||
4
app/Settings.Designer.cs
generated
4
app/Settings.Designer.cs
generated
@@ -438,7 +438,7 @@ namespace GHelper
|
||||
// checkStartup
|
||||
//
|
||||
checkStartup.AutoSize = true;
|
||||
checkStartup.Location = new Point(36, 11);
|
||||
checkStartup.Location = new Point(24, 11);
|
||||
checkStartup.Margin = new Padding(11, 5, 11, 5);
|
||||
checkStartup.Name = "checkStartup";
|
||||
checkStartup.Size = new Size(206, 36);
|
||||
@@ -1202,7 +1202,7 @@ namespace GHelper
|
||||
labelCharge.Dock = DockStyle.Right;
|
||||
labelCharge.ForeColor = SystemColors.ControlDark;
|
||||
labelCharge.Location = new Point(365, 0);
|
||||
labelCharge.Margin = new Padding(0, 0, 0, 0);
|
||||
labelCharge.Margin = new Padding(0);
|
||||
labelCharge.Name = "labelCharge";
|
||||
labelCharge.Padding = new Padding(0, 0, 20, 0);
|
||||
labelCharge.Size = new Size(462, 56);
|
||||
|
||||
Reference in New Issue
Block a user