aboutsummaryrefslogtreecommitdiffstats
path: root/LibOVR/Src/Kernel/OVR_System.cpp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-03-27 02:57:20 +0100
committerSven Gothel <[email protected]>2015-03-27 02:57:20 +0100
commit3c7b8a17e907f4ef2afd9f77db566a3f6179cbe4 (patch)
treedf5c8e4665669de2bf1b88af6d93db4599c29d1d /LibOVR/Src/Kernel/OVR_System.cpp
parent633f70342fe270fd91bca8f724049aceec602337 (diff)
Bug 1116: Oculus SDK 0.4.4 support for JOGL: Use new 'HEADLESS_APP' mode, i.e. drop all display related code.v2.3.1jogamp_0.4.4
HEADLESS_APP (new CPP define) is required to drop all display related code. TODO: JOGL needs to display the HSW (Health and Safety Warning) messages to comply w/ license!
Diffstat (limited to 'LibOVR/Src/Kernel/OVR_System.cpp')
-rw-r--r--LibOVR/Src/Kernel/OVR_System.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/LibOVR/Src/Kernel/OVR_System.cpp b/LibOVR/Src/Kernel/OVR_System.cpp
index 66c764a..c8c7b87 100644
--- a/LibOVR/Src/Kernel/OVR_System.cpp
+++ b/LibOVR/Src/Kernel/OVR_System.cpp
@@ -29,9 +29,11 @@ limitations under the License.
#include "OVR_Threads.h"
#include "OVR_Timer.h"
#include "../Displays/OVR_Display.h"
+#if !defined(HEADLESS_APP)
#ifdef OVR_OS_WIN32
#include "../Displays/OVR_Win32_ShimFunctions.h"
#endif
+#endif /* !defined(HEADLESS_APP) */
namespace OVR {
@@ -55,6 +57,7 @@ void SystemSingletonInternal::PushDestroyCallbacks()
void System::DirectDisplayInitialize()
{
+#if !defined(HEADLESS_APP)
#ifdef OVR_OS_WIN32
// Set up display code for Windows
Win32::DisplayShim::GetInstance();
@@ -72,6 +75,7 @@ void System::DirectDisplayInitialize()
DisplayShimInitialized = Win32::DisplayShim::GetInstance().Initialize(anyExtendedRifts);
#endif
+#endif /* !defined(HEADLESS_APP) */
}
bool System::DirectDisplayEnabled()
@@ -100,9 +104,11 @@ void System::Destroy()
{
if (Allocator::GetInstance())
{
+#if !defined(HEADLESS_APP)
#ifdef OVR_OS_WIN32
Win32::DisplayShim::GetInstance().Shutdown();
#endif
+#endif /* !defined(HEADLESS_APP) */
// Invoke all of the post-finish callbacks (normal case)
for (SystemSingletonInternal *listener = SystemShutdownListenerStack; listener; listener = listener->NextSingleton)