summaryrefslogtreecommitdiff
path: root/graphics/src/lib.rs
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-11-10 15:05:45 -0500
committerFreya Murphy <freya@freyacat.org>2025-11-10 15:05:45 -0500
commitcaefd6a78323379cdd39339a4e792a19f0a494f0 (patch)
tree441984c300b1dd81ff40365386b20b5a3dec8bf7 /graphics/src/lib.rs
parentdungeon: new_unchecked should be unsafe (diff)
downloadDungeonCrawl-caefd6a78323379cdd39339a4e792a19f0a494f0.tar.gz
DungeonCrawl-caefd6a78323379cdd39339a4e792a19f0a494f0.tar.bz2
DungeonCrawl-caefd6a78323379cdd39339a4e792a19f0a494f0.zip
graphics: decouple sdl & wayland
Diffstat (limited to '')
-rw-r--r--graphics/src/lib.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/graphics/src/lib.rs b/graphics/src/lib.rs
index 811494c..25b4287 100644
--- a/graphics/src/lib.rs
+++ b/graphics/src/lib.rs
@@ -84,6 +84,15 @@ impl<'a> WindowBuilder<'a> {
builder.log_level(TraceLogLevel::LOG_WARNING);
}
+ // Set highdpi for wayland (this is only an issue for glfw)
+ // Rust binding to not make this accessable
+ #[cfg(feature = "wayland")]
+ #[cfg(not(feature = "sdl"))]
+ unsafe {
+ use ffi::ConfigFlags::*;
+ ffi::SetConfigFlags(FLAG_WINDOW_HIGHDPI as u32);
+ }
+
let (mut handle, thread) = builder.build();
if !handle.is_window_ready() {
return Err("Raylib window not ready!".into());