From a352ecb7e63304034ac93332cf0c4d9183df867e Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 14 Jul 2015 07:12:13 +0200 Subject: Fix compilation / linkage of 0.5.0.1 HEADLESS_APP mode Tested: GNU/Linux and OSX --- LibOVR/Src/OVR_CAPI.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'LibOVR/Src/OVR_CAPI.cpp') 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; -- cgit v1.2.3