commiting fixes from Ettore for building on linux & win 32
authorJean-Luc Peurière <jlp@nerim.net>
Sun, 15 Jul 2007 14:30:09 +0000 (14:30 +0000)
committerJean-Luc Peurière <jlp@nerim.net>
Sun, 15 Jul 2007 14:30:09 +0000 (14:30 +0000)
intern/ghost/intern/GHOST_NDOFManager.cpp
intern/ghost/intern/GHOST_NDOFManager.h
intern/ghost/intern/GHOST_SystemWin32.cpp
intern/ghost/intern/GHOST_SystemX11.cpp

index f88016b6b3e1cdca5cde1b7f03e7bb760eb2f288..501d6c57dd577795e6f6a23154653679e42ec611 100644 (file)
@@ -70,9 +70,6 @@ GHOST_NDOFManager::deviceOpen(GHOST_IWindow* window,
     if (ndofLibraryInit  && ndofDeviceOpen)
     {
        printf("%i client \n", ndofLibraryInit());
-               
-               m_DeviceHandle = ndofDeviceOpen((void *)&currentNdofValues);    
-               
                #if defined(_WIN32) || defined(__APPLE__)
                        m_DeviceHandle = ndofDeviceOpen((void *)&currentNdofValues);    
                #else
index 03037797e1eca0453697f4eefaf4cd530fd62622..c1f0b2c80af478ceb795bab9f069cb2e003afe70 100644 (file)
 class GHOST_NDOFManager
 {
 public:
-       /**
-        * Constructor.
-        */
        GHOST_NDOFManager();
-
-       /**
-        * Destructor.
-        */
        virtual ~GHOST_NDOFManager();
 
     void deviceOpen(GHOST_IWindow* window,
index bfd41e2994648db3d233c85984290ca1d87dc43f..89a9698711304493ff74d6d902e9662ff14a3f52 100644 (file)
@@ -843,6 +843,17 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
                                         * In GHOST, we let DefWindowProc call the timer callback.
                                         */
                                        break;
+                               case WM_BLND_3DX:
+                                       {
+                                               GHOST_TEventNDOFData ndofdata;
+                                               system->m_ndofManager->GHOST_NDOFGetDatas(ndofdata);
+                                               system->m_eventManager->
+                                                       pushEvent(new GHOST_EventNDOF(
+                                                               system->getMilliSeconds(), 
+                                                               GHOST_kEventNDOFMotion, 
+                                                               window, ndofdata));
+                                       }
+                                       break;
                        }
                }
                else {
@@ -855,17 +866,6 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
                           WM_CREATE                    0x01
                           We let DefWindowProc do the work.
                        */
-                               case WM_BLND_3DX:
-                                       {
-                                               GHOST_TEventNDOFData ndofdata;
-                                               system->m_ndofManager->GHOST_NDOFGetDatas(ndofdata);
-                                               system->m_eventManager->
-                                                       pushEvent(new GHOST_EventNDOF(
-                                                               system->getMilliSeconds(), 
-                                                               GHOST_kEventNDOFMotion, 
-                                                               window, ndofdata));
-                                       }
-                                       break;
                }
        }
        else {
index 6eefb48f6e831192993afb1b50fa6dc2e5cbb4d6..e3d4ee405e8b1347441167b893d501a90790c0f9 100755 (executable)
@@ -484,7 +484,6 @@ GHOST_SystemX11::processEvent(XEvent *xe)
                        } else {
                                /* Unknown client message, ignore */
                        }
-#endif
                        break;
                }
                        
@@ -543,7 +542,7 @@ prepareNdofInfo(volatile GHOST_TEventNDOFData *currentNdofValues)
 {
        const vector<GHOST_IWindow*>& v(m_windowManager->getWindows());
        if (v.size() > 0)
-       sNdofInfo.window = static_cast<GHOST_WindowX11*>(v[0])->getXWindow();
+               sNdofInfo.window = static_cast<GHOST_WindowX11*>(v[0])->getXWindow();
        sNdofInfo.display = m_display;
        sNdofInfo.currValues = currentNdofValues;
        return (void*)&sNdofInfo;