internal/ui: better fix for initialMonitorByOS

Updates #2179
This commit is contained in:
Hajime Hoshi 2022-07-04 14:42:17 +09:00
parent 47c65a92ae
commit 08ebab0558

View File

@ -182,7 +182,10 @@ func initialMonitorByOS() (*glfw.Monitor, error) {
}
px, py, err := _GetCursorPos()
if err != nil && !errors.Is(err, windows.ERROR_ACCESS_DENIED) {
if err != nil {
if errors.Is(err, windows.ERROR_ACCESS_DENIED) {
return nil, nil
}
return nil, err
}
x, y := int(px), int(py)