Update to windows-sys 0.59 (#4098)
This commit is contained in:
parent
3a39a6ddb0
commit
23011c6b0a
17 changed files with 166 additions and 137 deletions
|
|
@ -63,12 +63,10 @@ impl VideoModeHandle {
|
|||
#[derive(Debug, Clone, Eq, PartialEq, Hash, PartialOrd, Ord)]
|
||||
pub struct MonitorHandle(HMONITOR);
|
||||
|
||||
// Send is not implemented for HMONITOR, we have to wrap it and implement it manually.
|
||||
// For more info see:
|
||||
// https://github.com/retep998/winapi-rs/issues/360
|
||||
// https://github.com/retep998/winapi-rs/issues/396
|
||||
// Send and Sync are not implemented for HMONITOR, we have to wrap it and implement them manually.
|
||||
|
||||
unsafe impl Send for MonitorHandle {}
|
||||
unsafe impl Sync for MonitorHandle {}
|
||||
|
||||
unsafe extern "system" fn monitor_enum_proc(
|
||||
hmonitor: HMONITOR,
|
||||
|
|
@ -85,7 +83,7 @@ pub fn available_monitors() -> VecDeque<MonitorHandle> {
|
|||
let mut monitors: VecDeque<MonitorHandle> = VecDeque::new();
|
||||
unsafe {
|
||||
EnumDisplayMonitors(
|
||||
0,
|
||||
ptr::null_mut(),
|
||||
ptr::null(),
|
||||
Some(monitor_enum_proc),
|
||||
&mut monitors as *mut _ as LPARAM,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue