robotgo
robotgo copied to clipboard
GetDisplayBounds(), GetScaleSize() do not work at all: NaN and -9223372036854775808
- Robotgo version (or commit ref): v1.0.0-rc1
- Go version: 1.18.3 darwin/amd64
- Gcc version: "gcc: stable 12.2.0 (bottled), HEAD"
- Operating system and bit: macOS x64
- Resolution: Built in Retina display (MBP): 1440x900, external monitor: 3440x1440
- Provide example code:
for i := 0; i < robotgo.DisplaysNum(); i++ {
fmt.Printf("Display: %d ::: \n", i)
fmt.Println(robotgo.GetDisplayBounds(i))
fmt.Println(robotgo.GetScreenRect(i))
fmt.Println(robotgo.GetScaleSize(i))
fmt.Println(robotgo.ScaleF(i))
fmt.Println(robotgo.SysScale(i))
fmt.Println("-------")
}
This prints:
Display: 0 :::
0 0 1440 900
{{0 0} {1440 900}}
2880 1800
2
2
-------
Display: 1 :::
1440 0 3440 1440
{{0 0} {0 0}}
-9223372036854775808 -9223372036854775808
NaN
NaN
Clearly {0 0}
, NaN
, and -9223372036854775808
are being reported wrongly here.