enumerate monitors in addition to adapters; this allows the MonitorID implementation to return a more useful monitor name, and the correct native monitor ID
This commit is contained in:
parent
1c20ff87f1
commit
1c9c5c018a
2 changed files with 70 additions and 34 deletions
|
|
@ -301,7 +301,7 @@ unsafe fn switch_to_fullscreen(rect: &mut winapi::RECT, monitor: &MonitorID)
|
|||
screen_settings.dmBitsPerPel = 32; // TODO: ?
|
||||
screen_settings.dmFields = winapi::DM_BITSPERPEL | winapi::DM_PELSWIDTH | winapi::DM_PELSHEIGHT;
|
||||
|
||||
let result = user32::ChangeDisplaySettingsExW(monitor.get_system_name().as_ptr(),
|
||||
let result = user32::ChangeDisplaySettingsExW(monitor.get_adapter_name().as_ptr(),
|
||||
&mut screen_settings, ptr::null_mut(),
|
||||
winapi::CDS_FULLSCREEN, ptr::null_mut());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue