committing Ettore Pasquini MS windows support
authorJean-Luc Peurière <jlp@nerim.net>
Thu, 28 Jun 2007 22:37:38 +0000 (22:37 +0000)
committerJean-Luc Peurière <jlp@nerim.net>
Thu, 28 Jun 2007 22:37:38 +0000 (22:37 +0000)
for NDOF devices

I applied the patch but cant test so please
let me know if any problem.

the plugin itself can be found either
on Ettore site http://cubelogic/blender/
or on my site http://jlp.nerim.net/dev/6dof/

on my site there is also the source of
mac plugin

intern/ghost/GHOST_Types.h
intern/ghost/intern/GHOST_SystemWin32.cpp
intern/ghost/make/msvc_7_0/ghost.vcproj

index 9b8a402a195c191e2b8c01a3824e6b7f5db62cc1..0de4c162ab87de075ec049cbdccd2761b1ddadd6 100644 (file)
@@ -39,6 +39,10 @@ typedef unsigned short               GHOST_TUns16;
 typedef        int                                     GHOST_TInt32;
 typedef        unsigned int            GHOST_TUns32;
 
+#ifdef WIN32
+#define WM_BLND_3DX                    WM_USER + 1
+#endif
+
 #if defined(WIN32) && !defined(FREE_WINDOWS)
 typedef __int64                                GHOST_TInt64;
 typedef unsigned __int64       GHOST_TUns64;
index ec6d0d355b59977a22b786a088a5411c64fa4086..bfd41e2994648db3d233c85984290ca1d87dc43f 100644 (file)
 #include "GHOST_EventCursor.h"
 #include "GHOST_EventKey.h"
 #include "GHOST_EventWheel.h"
+#include "GHOST_EventNDOF.h"
 #include "GHOST_TimerTask.h"
 #include "GHOST_TimerManager.h"
 #include "GHOST_WindowManager.h"
 #include "GHOST_WindowWin32.h"
+#include "GHOST_NDOFManager.h"
 
 // Key code values not found in winuser.h
 #ifndef VK_MINUS
@@ -853,6 +855,17 @@ 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 9d0aef451e7b8a53647b99bbe2d315405096cff1..e5b2e09a67816a3360bc4e05e8c7ec261cd2fdc5 100644 (file)
@@ -280,6 +280,9 @@ ECHO Done
                                <File
                                        RelativePath="..\..\intern\GHOST_EventManager.h">
                                </File>
+                               <File
+                                       RelativePath="..\..\intern\GHOST_EventNDOF.h">
+                               </File>
                                <File
                                        RelativePath="..\..\intern\GHOST_EventPrinter.h">
                                </File>
@@ -292,6 +295,9 @@ ECHO Done
                                <File
                                        RelativePath="..\..\intern\GHOST_ModifierKeys.h">
                                </File>
+                               <File
+                                       RelativePath="..\..\intern\GHOST_NDOFManager.cpp">
+                               </File>
                                <File
                                        RelativePath="..\..\intern\GHOST_System.h">
                                </File>
@@ -373,6 +379,9 @@ ECHO Done
                        <File
                                RelativePath="..\..\intern\GHOST_ModifierKeys.cpp">
                        </File>
+                       <File
+                               RelativePath="..\..\intern\GHOST_NDOFManager.cpp">
+                       </File>
                        <File
                                RelativePath="..\..\intern\GHOST_Rect.cpp">
                        </File>