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