diff options
author | Alexander Neumann <an2048@gmail.com> | 2019-05-01 17:28:23 +0200 |
---|---|---|
committer | Alexander Neumann <an2048@gmail.com> | 2019-05-01 17:28:23 +0200 |
commit | 4eb6814c518749ad2f499e81383c373b3fac4358 (patch) | |
tree | 0df32a44f5942607d054e6e218cc04be05139e03 | |
parent | Add some hidpi stuff (diff) | |
download | wireguard-windows-4eb6814c518749ad2f499e81383c373b3fac4358.tar.xz wireguard-windows-4eb6814c518749ad2f499e81383c373b3fac4358.zip |
Fix GetSystemMetricsForDpi crash
-rw-r--r-- | user32.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -2423,6 +2423,10 @@ func GetSystemMetrics(nIndex int32) int32 { } func GetSystemMetricsForDpi(nIndex int32, dpi uint32) int32 { + if getSystemMetricsForDpi.Find() != nil { + return GetSystemMetrics(nIndex) + } + ret, _, _ := syscall.Syscall(getSystemMetricsForDpi.Addr(), 2, uintptr(nIndex), uintptr(dpi), |