diff options
Diffstat (limited to 'platform/linuxbsd')
-rw-r--r-- | platform/linuxbsd/detect.py | 2 | ||||
-rw-r--r-- | platform/linuxbsd/wayland/display_server_wayland.cpp | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/platform/linuxbsd/detect.py b/platform/linuxbsd/detect.py index afc9d25a80..a8b8d2934a 100644 --- a/platform/linuxbsd/detect.py +++ b/platform/linuxbsd/detect.py @@ -309,7 +309,7 @@ def configure(env: "SConsEnvironment"): if not env["builtin_embree"] and env["arch"] in ["x86_64", "arm64"]: # No pkgconfig file so far, hardcode expected lib name. - env.Append(LIBS=["embree3"]) + env.Append(LIBS=["embree4"]) if not env["builtin_openxr"]: env.ParseConfig("pkg-config openxr --cflags --libs") diff --git a/platform/linuxbsd/wayland/display_server_wayland.cpp b/platform/linuxbsd/wayland/display_server_wayland.cpp index 1c3cae0435..f7995472d0 100644 --- a/platform/linuxbsd/wayland/display_server_wayland.cpp +++ b/platform/linuxbsd/wayland/display_server_wayland.cpp @@ -550,7 +550,15 @@ float DisplayServerWayland::screen_get_scale(int p_screen) const { MutexLock mutex_lock(wayland_thread.mutex); if (p_screen == SCREEN_OF_MAIN_WINDOW) { - p_screen = window_get_current_screen(); + // Wayland does not expose fractional scale factors at the screen-level, but + // some code relies on it. Since this special screen is the default and a lot + // of code relies on it, we'll return the window's scale, which is what we + // really care about. After all, we have very little use of the actual screen + // enumeration APIs and we're (for now) in single-window mode anyways. + struct wl_surface *wl_surface = wayland_thread.window_get_wl_surface(MAIN_WINDOW_ID); + WaylandThread::WindowState *ws = wayland_thread.wl_surface_get_window_state(wl_surface); + + return wayland_thread.window_state_get_scale_factor(ws); } return wayland_thread.screen_get_data(p_screen).scale; |