build(deps): bump windows-sys from 0.52.0 to 0.59.0 (#32982)

* build(deps): bump windows-sys from 0.52.0 to 0.59.0

Bumps [windows-sys](https://github.com/microsoft/windows-rs) from 0.52.0 to 0.59.0.
- [Release notes](https://github.com/microsoft/windows-rs/releases)
- [Commits](https://github.com/microsoft/windows-rs/compare/0.52.0...0.59.0)

---
updated-dependencies:
- dependency-name: windows-sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix GetDC call to match api change

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
dependabot[bot] 2024-08-09 06:33:26 +00:00 committed by GitHub
parent 4eae4e29fa
commit c6a6319502
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 5 deletions

View file

@ -66,7 +66,7 @@ fn window_creation_scale_factor() -> Scale<f32, DeviceIndependentPixel, DevicePi
fn window_creation_scale_factor() -> Scale<f32, DeviceIndependentPixel, DevicePixel> {
use windows_sys::Win32::Graphics::Gdi::{GetDC, GetDeviceCaps, LOGPIXELSY};
let ppi = unsafe { GetDeviceCaps(GetDC(0), LOGPIXELSY as i32) };
let ppi = unsafe { GetDeviceCaps(GetDC(std::ptr::null_mut()), LOGPIXELSY as i32) };
Scale::new(ppi as f32 / 96.0)
}