mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Last minute fix
This commit is contained in:
@@ -18,6 +18,8 @@ UPDATE: February 12, 2023
|
||||
|
||||
3. App will save settings and write a basic log of it's actions to APPDATA\LOCAL directory
|
||||
|
||||
4. App will reapply Panel Overdrive and Performance mode on each start (based on last setting from config)
|
||||
|
||||
Extra: **autostart.ps1** script to schedule autostart of the app (with admin privileges) on every user logon for convenience. Later will be integrated into main app.
|
||||
|
||||
--------
|
||||
|
||||
BIN
g14-helper.exe
BIN
g14-helper.exe
Binary file not shown.
17
gpu.ps1
17
gpu.ps1
@@ -388,31 +388,38 @@ function SetGPUMode ($gpu_mode = "standard") {
|
||||
if ($gpu_mode -eq $script:gpu_mode) {return}
|
||||
|
||||
$restart = $false;
|
||||
$changed = $false;
|
||||
|
||||
if ($script:gpu_mode -eq "ultimate") {
|
||||
$msgBox = [System.Windows.MessageBox]::Show('Switching off Ultimate Mode requires restart','Reboot now?','OKCancel')
|
||||
if ($msgBox -eq 'OK') {
|
||||
Invoke-CimMethod $asushw -MethodName DEVS -Arguments @{Device_ID=$device_mux ; Control_status=1 }
|
||||
$restart = $true;
|
||||
$restart = $true;
|
||||
$changed = $true;
|
||||
}
|
||||
} elseif ($gpu_mode -eq "ultimate") {
|
||||
$msgBox = [System.Windows.MessageBox]::Show('Ultimate mode requires restart','Reboot now?','OKCancel')
|
||||
if ($msgBox -eq 'OK') {
|
||||
Invoke-CimMethod $asushw -MethodName DEVS -Arguments @{Device_ID=$device_mux ; Control_status=0 }
|
||||
$restart = $true;
|
||||
$restart = $true;
|
||||
$changed = $true;
|
||||
}
|
||||
} elseif ($gpu_mode -eq "eco") {
|
||||
UIGPUMode($gpu_mode);
|
||||
Invoke-CimMethod $asushw -MethodName DEVS -Arguments @{Device_ID=$device_eco ; Control_status=1 }
|
||||
$changed = $true;
|
||||
} elseif ($gpu_mode -eq "standard") {
|
||||
UIGPUMode($gpu_mode);
|
||||
Invoke-CimMethod $asushw -MethodName DEVS -Arguments @{Device_ID=$device_eco ; Control_status=0 }
|
||||
$changed = $true;
|
||||
}
|
||||
|
||||
$script:gpu_mode = $gpu_mode;
|
||||
SaveConfigSetting -Name 'gpu_mode' -Value $gpu_mode
|
||||
if ($changed) {
|
||||
$script:gpu_mode = $gpu_mode;
|
||||
SaveConfigSetting -Name 'gpu_mode' -Value $gpu_mode
|
||||
WriteLog("GPU set to "+$gpu_mode)
|
||||
}
|
||||
|
||||
WriteLog("GPU set to "+$gpu_mode)
|
||||
|
||||
if ($restart) {
|
||||
UIGPUMode($gpu_mode);
|
||||
|
||||
Reference in New Issue
Block a user