Update to windows-sys 0.59 (#4098)

This commit is contained in:
valadaptive 2025-02-23 22:40:11 -05:00 committed by GitHub
parent 3a39a6ddb0
commit 23011c6b0a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 166 additions and 137 deletions

View file

@ -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,