Update monado
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
From d29c35507c125fa720f9e20f1c70aa09180f6e5a Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Nicolas <patricknicolas@laposte.net>
|
||||
Date: Sat, 15 Mar 2025 22:19:48 +0100
|
||||
Subject: [PATCH 4/6] st/oxr: forward 0 refresh rate
|
||||
|
||||
---
|
||||
src/xrt/compositor/main/comp_compositor.c | 2 +-
|
||||
src/xrt/state_trackers/oxr/oxr_api_session.c | 6 +-----
|
||||
2 files changed, 2 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/xrt/compositor/main/comp_compositor.c b/src/xrt/compositor/main/comp_compositor.c
|
||||
index 5feccdd33..b5e0d6711 100644
|
||||
--- a/src/xrt/compositor/main/comp_compositor.c
|
||||
+++ b/src/xrt/compositor/main/comp_compositor.c
|
||||
@@ -368,7 +368,7 @@ compositor_request_display_refresh_rate(struct xrt_compositor *xc, float display
|
||||
if (c->target && c->target->request_refresh_rate) {
|
||||
xrt_result_t result = comp_target_request_refresh_rate(c->target, display_refresh_rate_hz);
|
||||
// Assume refresh rate change is immediate
|
||||
- if (result == XRT_SUCCESS)
|
||||
+ if (result == XRT_SUCCESS && display_refresh_rate_hz > 0)
|
||||
c->frame_interval_ns = U_TIME_1S_IN_NS / display_refresh_rate_hz;
|
||||
return result;
|
||||
}
|
||||
diff --git a/src/xrt/state_trackers/oxr/oxr_api_session.c b/src/xrt/state_trackers/oxr/oxr_api_session.c
|
||||
index 9c5889f12..c4cdaf8c3 100644
|
||||
--- a/src/xrt/state_trackers/oxr/oxr_api_session.c
|
||||
+++ b/src/xrt/state_trackers/oxr/oxr_api_session.c
|
||||
@@ -717,15 +717,11 @@ oxr_xrRequestDisplayRefreshRateFB(XrSession session, float displayRefreshRate)
|
||||
OXR_VERIFY_SESSION_AND_INIT_LOG(&log, session, sess, "xrRequestDisplayRefreshRateFB");
|
||||
OXR_VERIFY_SESSION_NOT_LOST(&log, sess);
|
||||
|
||||
- if (displayRefreshRate == 0.0f) {
|
||||
- return XR_SUCCESS;
|
||||
- }
|
||||
-
|
||||
/*
|
||||
* For the requested display refresh rate, truncating to two decimal
|
||||
* places and checking if it's in the supported refresh rates.
|
||||
*/
|
||||
- bool found = false;
|
||||
+ bool found = displayRefreshRate == 0.0f;
|
||||
for (int i = 0; i < (int)sess->sys->xsysc->info.refresh_rate_count; ++i) {
|
||||
if ((int)(displayRefreshRate * 100.0f) == (int)(sess->sys->xsysc->info.refresh_rates_hz[i] * 100.0f)) {
|
||||
found = true;
|
||||
--
|
||||
2.51.2
|
||||
|
||||
Reference in New Issue
Block a user