Make ns identifiers use snake_case on macOS (#904)
This makes the macOS API style consistent with that of iOS.
This commit is contained in:
parent
07356b9634
commit
f256ff7d58
7 changed files with 206 additions and 205 deletions
|
|
@ -86,14 +86,14 @@ impl MonitorHandle {
|
|||
}
|
||||
|
||||
pub fn hidpi_factor(&self) -> f64 {
|
||||
let screen = match self.nsscreen() {
|
||||
let screen = match self.ns_screen() {
|
||||
Some(screen) => screen,
|
||||
None => return 1.0, // default to 1.0 when we can't find the screen
|
||||
};
|
||||
unsafe { NSScreen::backingScaleFactor(screen) as f64 }
|
||||
}
|
||||
|
||||
pub(crate) fn nsscreen(&self) -> Option<id> {
|
||||
pub(crate) fn ns_screen(&self) -> Option<id> {
|
||||
unsafe {
|
||||
let native_id = self.native_identifier();
|
||||
let screens = NSScreen::screens(nil);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue