Properly disable NDOF code when WITH_INPUT_NDOF is not define.

This commit is contained in:
Nathan Letwory
2011-08-02 10:20:47 +00:00
parent c1cf646bb7
commit 69b4962fc0
4 changed files with 19 additions and 1 deletions

View File

@@ -202,10 +202,12 @@ bool GHOST_System::dispatchEvents()
{
bool handled = false;
#ifdef WITH_INPUT_NDOF
// NDOF Motion event is sent only once per dispatch, so do it now:
if (m_ndofManager) {
handled |= m_ndofManager->sendMotionEvent();
}
#endif
if (m_eventManager) {
handled |= m_eventManager->dispatchEvents();
@@ -319,10 +321,12 @@ GHOST_TSuccess GHOST_System::exit()
delete m_eventManager;
m_eventManager = 0;
}
#ifdef WITH_INPUT_NDOF
if (m_ndofManager) {
delete m_ndofManager;
m_ndofManager = 0;
}
#endif
return GHOST_kSuccess;
}