From c6a6319502c3df4bf401d394a27854aa1f267658 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 9 Aug 2024 06:33:26 +0000 Subject: [PATCH] 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] * fix GetDC call to match api change Signed-off-by: Mukilan Thiyagarajan --------- Signed-off-by: dependabot[bot] Signed-off-by: Mukilan Thiyagarajan Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mukilan Thiyagarajan --- Cargo.lock | 6 +++--- Cargo.toml | 2 +- ports/servoshell/desktop/headed_window.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9955c38fd04..dc3bef2f71c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3920,7 +3920,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets 0.48.5", ] [[package]] @@ -6087,7 +6087,7 @@ dependencies = [ "libc", "tikv-jemalloc-sys", "tikv-jemallocator", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -6218,7 +6218,7 @@ dependencies = [ "url", "vergen", "webxr", - "windows-sys 0.52.0", + "windows-sys 0.59.0", "winit", "winres", ] diff --git a/Cargo.toml b/Cargo.toml index ef34b2a0c4f..f09a2f382d8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -140,7 +140,7 @@ webrender_api = { git = "https://github.com/servo/webrender", branch = "0.65" } webrender_traits = { path = "components/shared/webrender" } wgpu-core = { git = "https://github.com/gfx-rs/wgpu", rev = "781b54a8b9cee1a2cb22bda565662edec52eb70e" } wgpu-types = { git = "https://github.com/gfx-rs/wgpu", rev = "781b54a8b9cee1a2cb22bda565662edec52eb70e" } -windows-sys = "0.52" +windows-sys = "0.59" xi-unicode = "0.1.0" xml5ever = "0.18" diff --git a/ports/servoshell/desktop/headed_window.rs b/ports/servoshell/desktop/headed_window.rs index f585cc2a101..73be7c7602c 100644 --- a/ports/servoshell/desktop/headed_window.rs +++ b/ports/servoshell/desktop/headed_window.rs @@ -66,7 +66,7 @@ fn window_creation_scale_factor() -> Scale Scale { 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) }