2022-09-29 18:43:35 +10:00
|
|
|
//go:build windows
|
|
|
|
|
|
|
|
|
|
package application
|
2021-04-29 21:25:03 +10:00
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"fmt"
|
|
|
|
|
"syscall"
|
|
|
|
|
)
|
|
|
|
|
|
2022-09-29 18:43:35 +10:00
|
|
|
func applicationInit() error {
|
2021-04-29 21:25:03 +10:00
|
|
|
status, r, err := syscall.NewLazyDLL("user32.dll").NewProc("SetProcessDPIAware").Call()
|
|
|
|
|
if status == 0 {
|
|
|
|
|
return fmt.Errorf("exit status %d: %v %v", status, r, err)
|
|
|
|
|
}
|
|
|
|
|
return nil
|
|
|
|
|
}
|