mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 14:21:31 +11:00
parent
28775be115
commit
f874d76289
|
@ -1,7 +1,7 @@
|
|||
use std::{
|
||||
collections::VecDeque,
|
||||
ffi::c_void,
|
||||
fmt::{self, Debug, Formatter},
|
||||
fmt::{self, Debug},
|
||||
marker::PhantomData,
|
||||
mem, ptr,
|
||||
sync::mpsc::{self, Receiver, Sender},
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
#![allow(non_snake_case, unused_unsafe)]
|
||||
|
||||
use std::{
|
||||
mem,
|
||||
os::raw::c_void,
|
||||
sync::{Once, ONCE_INIT},
|
||||
};
|
||||
use std::{mem, os::raw::c_void, sync::Once};
|
||||
|
||||
use winapi::{
|
||||
shared::{
|
||||
|
@ -79,7 +75,7 @@ pub fn become_dpi_aware(enable: bool) {
|
|||
if !enable {
|
||||
return;
|
||||
}
|
||||
static ENABLE_DPI_AWARENESS: Once = ONCE_INIT;
|
||||
static ENABLE_DPI_AWARENESS: Once = Once::new();
|
||||
ENABLE_DPI_AWARENESS.call_once(|| {
|
||||
unsafe {
|
||||
if let Some(SetProcessDpiAwarenessContext) =
|
||||
|
|
Loading…
Reference in a new issue