The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

c/main: fix call to comp_target_get_refresh_rates condition

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2391>

+3 -3
+3 -3
src/xrt/compositor/main/comp_compositor.c
··· 332 332 #else 333 333 struct comp_compositor *c = comp_compositor(xc); 334 334 335 - if (c->target->get_current_refresh_rate) { 335 + if (c->target && c->target->get_current_refresh_rate) { 336 336 return comp_target_get_current_refresh_rate(c->target, out_display_refresh_rate_hz); 337 337 } else { 338 338 *out_display_refresh_rate_hz = (float)(1. / time_ns_to_s(c->frame_interval_ns)); ··· 364 364 dlclose(android_handle); 365 365 #else 366 366 struct comp_compositor *c = comp_compositor(xc); 367 - if (c->target->request_refresh_rate) { 367 + if (c->target && c->target->request_refresh_rate) { 368 368 xrt_result_t result = comp_target_request_refresh_rate(c->target, display_refresh_rate_hz); 369 369 // Assume refresh rate change is immediate 370 370 if (result == XRT_SUCCESS) ··· 1168 1168 sys_info->refresh_rates_hz[i] = metrics.refresh_rates[i]; 1169 1169 } 1170 1170 #else 1171 - if (c->target->get_refresh_rates) { 1171 + if (c->target && c->target->get_refresh_rates) { 1172 1172 comp_target_get_refresh_rates(c->target, &sys_info->refresh_rate_count, sys_info->refresh_rates_hz); 1173 1173 } else { 1174 1174 //! @todo: Query all supported refresh rates of the current mode