diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-08-26 10:47:20 -0600 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-08-26 14:48:41 -0600 |
commit | bda8c21a5799c384bfa93d483827478ec34a039a (patch) | |
tree | 6e71068ee9104c25997a681da9a1e6334f3c6003 /ui | |
parent | elevate: mark as terminal services aware (diff) | |
download | wireguard-windows-bda8c21a5799c384bfa93d483827478ec34a039a.tar.xz wireguard-windows-bda8c21a5799c384bfa93d483827478ec34a039a.zip |
ui: enable priority boost
This makes things a bit more responsive, despite causing some minor
issues for Go timers.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/ui.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -13,6 +13,7 @@ import ( "github.com/lxn/walk" "github.com/lxn/win" + "golang.org/x/sys/windows" "golang.zx2c4.com/wireguard/windows/manager" "golang.zx2c4.com/wireguard/windows/version" @@ -24,6 +25,8 @@ var startTime = time.Now() func RunUI() { runtime.LockOSThread() + thisProcess, _ := windows.GetCurrentProcess() + windows.SetProcessPriorityBoost(thisProcess, false) defer func() { if err := recover(); err != nil { showErrorCustom(nil, "Panic", fmt.Sprint(err, "\n\n", string(debug.Stack()))) |