Add logs for refresh rate change
This commit is contained in:
@@ -84,6 +84,7 @@ bool refresh_rate(
|
||||
rate == config.preferred_refresh_rate and divider == config.fps_divider,
|
||||
ImGuiSelectableFlags_SelectOnRelease))
|
||||
{
|
||||
spdlog::info("configured refresh rate: {}", rate);
|
||||
session.set_refresh_rate(rate);
|
||||
config.preferred_refresh_rate = rate;
|
||||
config.fps_divider = divider;
|
||||
|
||||
@@ -1147,6 +1147,7 @@ void scenes::stream::exit()
|
||||
|
||||
void scenes::stream::setup(const to_headset::video_stream_description & description)
|
||||
{
|
||||
spdlog::info("setup, refresh rate {}", description.refresh_rate);
|
||||
session.set_refresh_rate(description.refresh_rate);
|
||||
|
||||
std::unique_lock lock(decoder_mutex);
|
||||
@@ -1171,6 +1172,7 @@ void scenes::stream::setup_reprojection_swapchain(uint32_t swapchain_width, uint
|
||||
assert(swapchain_width);
|
||||
assert(swapchain_height);
|
||||
device.waitIdle();
|
||||
spdlog::info("swapchain setup, refresh rate {}", video_stream_description->refresh_rate);
|
||||
session.set_refresh_rate(video_stream_description->refresh_rate);
|
||||
|
||||
auto views = system.view_configuration_views(viewconfig);
|
||||
|
||||
@@ -111,6 +111,7 @@ void scenes::stream::operator()(to_headset::video_stream_description && desc)
|
||||
|
||||
void scenes::stream::operator()(to_headset::refresh_rate_change && rate)
|
||||
{
|
||||
spdlog::info("refresh rate change request: {}", rate.hz);
|
||||
session.set_refresh_rate(rate.hz);
|
||||
std::shared_lock lock(decoder_mutex);
|
||||
if (video_stream_description)
|
||||
|
||||
@@ -304,6 +304,7 @@ void xr::session::set_refresh_rate(float refresh_rate)
|
||||
{
|
||||
if (xrRequestDisplayRefreshRateFB)
|
||||
{
|
||||
spdlog::info("set refresh rate to {}Hz", refresh_rate);
|
||||
if (auto res = xrRequestDisplayRefreshRateFB(id, refresh_rate); res != XR_SUCCESS)
|
||||
spdlog::warn("Refresh rate change failed: {}", xr::to_string(res));
|
||||
}
|
||||
|
||||
@@ -561,6 +561,7 @@ xrt_result_t compositor::request_display_refresh_rate(float hz)
|
||||
try
|
||||
{
|
||||
requested_refresh_rate = hz;
|
||||
U_LOG_I("request refresh rate: %fHz", hz);
|
||||
session.send_control(to_headset::refresh_rate_change{.hz = hz});
|
||||
}
|
||||
catch (std::exception & e)
|
||||
|
||||
Reference in New Issue
Block a user