Skip to content

Commit 2e2bdab

Browse files
authored
Merge pull request #2 from PKUHPC/bugfix-windows-scale
bugfix: mouse windows scale go-vgo#716
2 parents 804d07a + 42a6162 commit 2e2bdab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

robotgo.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ func CheckMouse(btn string) C.MMMouseButton {
510510

511511
// MoveScale calculate the os scale factor x, y
512512
func MoveScale(x, y int, displayId ...int) (int, int) {
513-
if Scale && runtime.GOOS == "windows" {
513+
if Scale || runtime.GOOS == "windows" {
514514
f := ScaleF()
515515
x, y = Scaled1(x, f), Scaled1(y, f)
516516
}
@@ -634,7 +634,7 @@ func Location() (int, int) {
634634
x := int(pos.x)
635635
y := int(pos.y)
636636

637-
if runtime.GOOS == "windows" {
637+
if Scale || runtime.GOOS == "windows" {
638638
f := ScaleF()
639639
x, y = Scaled0(x, f), Scaled0(y, f)
640640
}

0 commit comments

Comments
 (0)