Check XR_FB_display_refresh_rate before using it
This commit is contained in:
+10
-7
@@ -840,14 +840,17 @@ void application::initialize()
|
||||
// world_space = xr_session.create_reference_space(XR_REFERENCE_SPACE_TYPE_LOCAL);
|
||||
|
||||
config.emplace(xr_system_id);
|
||||
try
|
||||
if (xr_instance.has_extension(XR_FB_DISPLAY_REFRESH_RATE_EXTENSION_NAME))
|
||||
{
|
||||
xr_session.set_refresh_rate(config->preferred_refresh_rate);
|
||||
}
|
||||
catch (std::exception & e)
|
||||
{
|
||||
spdlog::warn("failed to set refresh rate to {}: {}", config->preferred_refresh_rate, e.what());
|
||||
config->preferred_refresh_rate = 0;
|
||||
try
|
||||
{
|
||||
xr_session.set_refresh_rate(config->preferred_refresh_rate);
|
||||
}
|
||||
catch (std::exception & e)
|
||||
{
|
||||
spdlog::warn("failed to set refresh rate to {}: {}", config->preferred_refresh_rate, e.what());
|
||||
config->preferred_refresh_rate = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (hand_tracking_supported)
|
||||
|
||||
Reference in New Issue
Block a user