summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'graphics')
-rw-r--r--graphics/Cargo.toml2
-rw-r--r--graphics/src/lib.rs9
2 files changed, 10 insertions, 1 deletions
diff --git a/graphics/Cargo.toml b/graphics/Cargo.toml
index 6f3be4e..bfc5554 100644
--- a/graphics/Cargo.toml
+++ b/graphics/Cargo.toml
@@ -16,5 +16,5 @@ workspace = true
[features]
default = []
-wayland = ["sdl", "raylib/wayland"]
+wayland = ["raylib/GLFW_BUILD_WAYLAND", "raylib/wayland"]
sdl = ["raylib/sdl"]
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());