diff options
Diffstat (limited to 'LibOVR/Src/OVR_CAPI.cpp')
-rwxr-xr-x | LibOVR/Src/OVR_CAPI.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/LibOVR/Src/OVR_CAPI.cpp b/LibOVR/Src/OVR_CAPI.cpp index c530f82..e02151a 100755 --- a/LibOVR/Src/OVR_CAPI.cpp +++ b/LibOVR/Src/OVR_CAPI.cpp @@ -695,7 +695,12 @@ OVR_PUBLIC_FUNCTION(void) ovrHmd_EndFrame(ovrHmd hmddesc, hmds->checkBeginFrameScope("ovrHmd_EndFrame"); ThreadChecker::Scope checkScope(&hmds->RenderAPIThreadChecker, "ovrHmd_EndFrame"); - hmds->pRenderer->SetLatencyTestColor(hmds->LatencyTestActive ? hmds->LatencyTestDrawColor : nullptr); +#if !defined(HEADLESS_APP) + if (hmds->pRenderer) + { + hmds->pRenderer->SetLatencyTestColor(hmds->LatencyTestActive ? hmds->LatencyTestDrawColor : nullptr); + } +#endif /* !defined(HEADLESS_APP) */ ovrHmd_GetLatencyTest2DrawColor(hmddesc, nullptr); // We don't actually need to draw color, so send nullptr @@ -1111,13 +1116,19 @@ OVR_PUBLIC_FUNCTION(ovrBool) ovrHmd_GetLatencyTest2DrawColor(ovrHmd hmddesc, uns rgbColorOut[2] = hmds->LatencyTest2DrawColor[2]; } - if (hmds->pRenderer) +#if !defined(HEADLESS_APP) + if (hmds->pRenderer) { hmds->pRenderer->SetLatencyTest2Color(hmds->LatencyTest2DrawColor); + } +#endif /* !defined(HEADLESS_APP) */ } else { - if (hmds->pRenderer) +#if !defined(HEADLESS_APP) + if (hmds->pRenderer) { hmds->pRenderer->SetLatencyTest2Color(nullptr); + } +#endif /* !defined(HEADLESS_APP) */ } return dk2LatencyTest ? ovrTrue : ovrFalse; |