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 | b81b7951cb01a267766c38b9774dea6c3713d7ac (patch) | |
tree | 6e71068ee9104c25997a681da9a1e6334f3c6003 /ui | |
parent | elevate: mark as terminal services aware (diff) | |
download | wireguard-windows-b81b7951cb01a267766c38b9774dea6c3713d7ac.tar.xz wireguard-windows-b81b7951cb01a267766c38b9774dea6c3713d7ac.zip |
ui: enable priority boost
This makes things a bit more responsive, despite causing some minor
issues for Go timers.
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()))) |