The open source OpenXR runtime
0
fork

Configure Feed

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

comp: Update nominal frame interval to match chosen mode in direct mdoe

This value is used in xrWaitFrame() to throttle the application's rendering
down to the refresh rate of the HMD.

authored by

Christoph Haag and committed by
Lubosz Sarnecki
6b8103f3 36d6b71e

+14
+14
src/xrt/compositor/main/comp_window_direct_mode.cpp
··· 468 468 props.parameters.visibleRegion.height, 469 469 (float)props.parameters.refreshRate / 1000.); 470 470 471 + int64_t new_frame_interval = 472 + 1000. * 1000. * 1000. * 1000. / props.parameters.refreshRate; 473 + 474 + COMP_DEBUG(w->base.c, 475 + "Updating compositor settings nominal frame interval from " 476 + "%lu (%f Hz) to %lu (%f Hz)", 477 + w->base.c->settings.nominal_frame_interval_ns, 478 + 1000. * 1000. * 1000. / 479 + (float)w->base.c->settings.nominal_frame_interval_ns, 480 + new_frame_interval, 481 + (float)props.parameters.refreshRate / 1000.); 482 + 483 + w->base.c->settings.nominal_frame_interval_ns = new_frame_interval; 484 + 471 485 delete[] mode_properties; 472 486 473 487 return props.displayMode;