Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-08-02 09:52:27 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-08-02 09:52:27 +0400
commitfcd7d2b486f2435907423188ffdfe2840c966b0b (patch)
tree58414c67c39fea1e654ce2380fbbb2488716b0b5 /intern/ghost
parent8f3016098d726ec82b7f778d1e0a0d58f3da74cb (diff)
NDOF related edits
- fix for building without NDOF on X11 - quiet some warnings
Diffstat (limited to 'intern/ghost')
-rw-r--r--intern/ghost/CMakeLists.txt35
-rw-r--r--intern/ghost/SConscript3
-rw-r--r--intern/ghost/intern/GHOST_System.cpp8
-rw-r--r--intern/ghost/intern/GHOST_SystemX11.cpp4
4 files changed, 43 insertions, 7 deletions
diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt
index b69dff607e8..86829c892ed 100644
--- a/intern/ghost/CMakeLists.txt
+++ b/intern/ghost/CMakeLists.txt
@@ -97,6 +97,9 @@ if(WITH_GHOST_DEBUG)
add_definitions(-DWITH_GHOST_DEBUG)
endif()
+if(WITH_INPUT_NDOF)
+ add_definitions(-DWITH_INPUT_NDOF)
+endif()
if(WITH_HEADLESS OR WITH_GHOST_SDL)
if(WITH_HEADLESS)
@@ -158,14 +161,21 @@ elseif(APPLE)
intern/GHOST_SystemCocoa.mm
intern/GHOST_SystemPathsCocoa.mm
intern/GHOST_WindowCocoa.mm
- intern/GHOST_NDOFManagerCocoa.mm
intern/GHOST_DisplayManagerCocoa.h
intern/GHOST_SystemCocoa.h
intern/GHOST_SystemPathsCocoa.h
intern/GHOST_WindowCocoa.h
- intern/GHOST_NDOFManagerCocoa.h
)
+
+ if(WITH_INPUT_NDOF)
+ list(APPEND SRC
+ intern/GHOST_NDOFManagerCocoa.mm
+
+ intern/GHOST_NDOFManagerCocoa.h
+ )
+ endif()
+
else()
list(APPEND SRC
intern/GHOST_DisplayManagerCarbon.cpp
@@ -199,13 +209,11 @@ elseif(UNIX)
intern/GHOST_SystemX11.cpp
intern/GHOST_SystemPathsX11.cpp
intern/GHOST_WindowX11.cpp
- intern/GHOST_NDOFManagerX11.cpp
intern/GHOST_DisplayManagerX11.h
intern/GHOST_SystemX11.h
intern/GHOST_SystemPathsX11.h
intern/GHOST_WindowX11.h
- intern/GHOST_NDOFManagerX11.h
)
if(NOT WITH_INSTALL_PORTABLE)
@@ -219,6 +227,14 @@ elseif(UNIX)
)
endif()
+ if(WITH_INPUT_NDOF)
+ list(APPEND SRC
+ intern/GHOST_NDOFManagerX11.cpp
+
+ intern/GHOST_NDOFManagerX11.h
+ )
+ endif()
+
elseif(WIN32)
if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX")
@@ -234,7 +250,6 @@ elseif(WIN32)
intern/GHOST_SystemPathsWin32.cpp
intern/GHOST_WindowWin32.cpp
intern/GHOST_DropTargetWin32.cpp
- intern/GHOST_NDOFManagerWin32.cpp
intern/GHOST_DisplayManagerWin32.h
intern/GHOST_DropTargetWin32.h
@@ -242,8 +257,16 @@ elseif(WIN32)
intern/GHOST_SystemPathsWin32.h
intern/GHOST_WindowWin32.h
intern/GHOST_TaskbarWin32.h
- intern/GHOST_NDOFManagerWin32.h
)
+
+ if(WITH_INPUT_NDOF)
+ list(APPEND SRC
+ intern/GHOST_NDOFManagerWin32.cpp
+
+ intern/GHOST_NDOFManagerWin32.h
+ )
+ endif()
+
endif()
blender_add_lib(bf_intern_ghost "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/intern/ghost/SConscript b/intern/ghost/SConscript
index 3dec748ce31..d65eb0caab6 100644
--- a/intern/ghost/SConscript
+++ b/intern/ghost/SConscript
@@ -78,6 +78,9 @@ if env['BF_GHOST_DEBUG']:
else:
sources.remove('intern' + os.sep + 'GHOST_EventPrinter.cpp')
+if env['WITH_BF_3DMOUSE']:
+ defs.append('WITH_INPUT_NDOF')
+
if window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc'):
incs = env['BF_WINTAB_INC'] + ' ' + incs
diff --git a/intern/ghost/intern/GHOST_System.cpp b/intern/ghost/intern/GHOST_System.cpp
index 792adba7ce3..f601031f2b6 100644
--- a/intern/ghost/intern/GHOST_System.cpp
+++ b/intern/ghost/intern/GHOST_System.cpp
@@ -46,7 +46,13 @@
GHOST_System::GHOST_System()
-: m_displayManager(0), m_timerManager(0), m_windowManager(0), m_eventManager(0), m_ndofManager(0)
+ : m_displayManager(0),
+ m_timerManager(0),
+ m_windowManager(0),
+ m_eventManager(0)
+#ifdef WITH_INPUT_NDOF
+ , m_ndofManager(0)
+#endif
{
}
diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp
index 517c3a1ebac..105f71b514f 100644
--- a/intern/ghost/intern/GHOST_SystemX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemX11.cpp
@@ -167,7 +167,9 @@ init(
GHOST_TSuccess success = GHOST_System::init();
if (success) {
+#ifdef WITH_INPUT_NDOF
m_ndofManager = new GHOST_NDOFManagerX11(*this);
+#endif
m_displayManager = new GHOST_DisplayManagerX11(this);
if (m_displayManager) {
@@ -414,9 +416,11 @@ processEvents(
anyProcessed = true;
}
+#ifdef WITH_INPUT_NDOF
if (dynamic_cast<GHOST_NDOFManagerX11*>(m_ndofManager)->processEvents()) {
anyProcessed = true;
}
+#endif
} while (waitForEvent && !anyProcessed);