Skip to content

Commit c668e56

Browse files
committed
fix(platform): Linux/Windows compile fixes from f1c9cd2 HiDPI commit
- linux: wrap raw_display in Some() — wgpu 29 RawHandle expects Option<RawDisplayHandle>, not RawDisplayHandle - windows: same Some() wrap on the WindowsDisplayHandle path - windows: add Win32_UI_HiDpi feature so SetProcessDpiAwarenessContext / GetDpiForSystem / GetDpiForWindow imports resolve Caught by the new test.yml CI matrix on first run — these regressions shipped in f1c9cd2 (cross-platform HiDPI) which compiled only on macOS. Build-only fixes; remaining cross-platform issues (Linux Jolt linker, Windows wgpu test failures) tracked in separate GitHub issues.
1 parent 073efb2 commit c668e56

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

native/linux/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ pub extern "C" fn bloom_init_window(width: f64, height: f64, title_ptr: *const u
274274
)
275275
);
276276
instance.create_surface_unsafe(wgpu::SurfaceTargetUnsafe::RawHandle {
277-
raw_display_handle: raw_display,
277+
raw_display_handle: Some(raw_display),
278278
raw_window_handle: raw_window,
279279
}).expect("Failed to create surface")
280280
};

native/windows/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ wgpu = "29"
2020
windows = { version = "0.58", features = [
2121
"Win32_Foundation",
2222
"Win32_UI_WindowsAndMessaging",
23+
"Win32_UI_HiDpi",
2324
"Win32_UI_Input_KeyboardAndMouse",
2425
"Win32_Graphics_Gdi",
2526
"Win32_System_LibraryLoader",

native/windows/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,9 @@ pub extern "C" fn bloom_init_window(width: f64, height: f64, title_ptr: *const u
309309
);
310310
let raw = raw_window_handle::RawWindowHandle::Win32(handle);
311311
instance.create_surface_unsafe(wgpu::SurfaceTargetUnsafe::RawHandle {
312-
raw_display_handle: raw_window_handle::RawDisplayHandle::Windows(
312+
raw_display_handle: Some(raw_window_handle::RawDisplayHandle::Windows(
313313
raw_window_handle::WindowsDisplayHandle::new()
314-
),
314+
)),
315315
raw_window_handle: raw,
316316
}).expect("Failed to create surface")
317317
};

0 commit comments

Comments
 (0)