diff options
author | Sven Gothel <[email protected]> | 2015-07-14 07:12:13 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-07-14 07:12:13 +0200 |
commit | a352ecb7e63304034ac93332cf0c4d9183df867e (patch) | |
tree | 56d7754f7cfff8d728ced75c2a05d6fcd54dcae5 /LibOVR/Src/OVR_CAPI.cpp | |
parent | 450aa6f7df9e67dd256b86f94e65eaf707032aad (diff) |
Fix compilation / linkage of 0.5.0.1 HEADLESS_APP mode
Tested: GNU/Linux and OSX
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; |