Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions crates/deadlib-renderer/src/window_size.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ use winit::{
};

#[cfg(target_os = "macos")]
use winit::{dpi::LogicalSize, platform::macos::WindowAttributesExtMacOS};
use winit::dpi::LogicalSize;

#[cfg(target_os = "macos")]
#[inline(always)]
const fn macos_opengl_low_dpi(backend_type: BackendType, high_dpi: bool) -> bool {
backend_type == BackendType::OpenGL && !high_dpi
// `matches!` rather than `==`: `PartialEq::eq` is not callable in a `const fn`
// on stable, but pattern matching is.
matches!(backend_type, BackendType::OpenGL) && !high_dpi
}

#[cfg(not(target_os = "macos"))]
Expand Down
2 changes: 2 additions & 0 deletions crates/deadsync-shell/src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ use deadlib_renderer::{render_size_for_window, request_window_size, with_request
use deadsync_config::app_config::DisplayMode;
use winit::dpi::{PhysicalPosition, PhysicalSize};
use winit::event_loop::ActiveEventLoop;
#[cfg(target_os = "macos")]
use winit::platform::macos::WindowAttributesExtMacOS;
use winit::window::{Icon, Window};

const WINDOW_ICON_PATHS: [&str; 2] = [
Expand Down