Control automatic refresh rate adjustment

If an OpenXR application requests a specific frame rate, use that one.
In order to revert to automatic adjustment, an application shall request
a 0 refresh rate (no preference).
This commit is contained in:
Patrick Nicolas
2025-03-19 17:43:37 +01:00
parent 37de69f9df
commit 119e0a4336
3 changed files with 5 additions and 1 deletions
+1
View File
@@ -743,6 +743,7 @@ static xrt_result_t comp_wivrn_get_current_refresh_rate(struct comp_target * ct,
static xrt_result_t comp_wivrn_request_refresh_rate(struct comp_target * ct, float refresh_rate_hz)
{
struct wivrn_comp_target * cn = (struct wivrn_comp_target *)ct;
cn->requested_refresh_rate = refresh_rate_hz;
if (refresh_rate_hz == 0.0f)
refresh_rate_hz = get_default_rate(cn->cnx.get_info());