mac scale factor of each screen (#8368)
Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
committed by
GitHub
Unverified
parent
12ff1319f1
commit
60ea8d2c2b
@@ -71,7 +71,7 @@ impl Display {
|
||||
}
|
||||
|
||||
pub fn scale(self) -> f64 {
|
||||
let s = unsafe { BackingScaleFactor() as _ };
|
||||
let s = unsafe { BackingScaleFactor(self.0) as _ };
|
||||
if s > 1. {
|
||||
let enable_retina = super::ENABLE_RETINA.lock().unwrap().clone();
|
||||
if enable_retina {
|
||||
|
||||
@@ -193,7 +193,7 @@ extern "C" {
|
||||
pub fn CGDisplayIsOnline(display: u32) -> i32;
|
||||
|
||||
pub fn CGDisplayBounds(display: u32) -> CGRect;
|
||||
pub fn BackingScaleFactor() -> f32;
|
||||
pub fn BackingScaleFactor(display: u32) -> f32;
|
||||
|
||||
// IOSurface
|
||||
|
||||
|
||||
Reference in New Issue
Block a user