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
+2 -1
View File
@@ -595,7 +595,8 @@ void wivrn_session::run(std::stop_token stop)
{
offset_est.request_sample(*connection);
tracking_control.send(*connection);
refresh.adjust(*connection);
if (comp_target->requested_refresh_rate == 0)
refresh.adjust(*connection);
connection->poll(*this, 20);
}
catch (const std::exception & e)