robotgo_mac_unix.go 692 B

1234567891011121314151617181920212223
  1. // Copyright 2016 The go-vgo Project Developers. See the COPYRIGHT
  2. // file at the top-level directory of this distribution and at
  3. // https://github.com/go-vgo/robotgo/blob/master/LICENSE
  4. //
  5. // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
  6. // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
  7. // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
  8. // option. This file may not be copied, modified, or distributed
  9. // except according to those terms.
  10. //go:build !windows
  11. // +build !windows
  12. package robotgo
  13. // ScaleF get the system scale val
  14. func ScaleF(displayId ...int) float64 {
  15. f := SysScale(displayId...)
  16. if f == 0.0 {
  17. f = 1.0
  18. }
  19. return f
  20. }