From a75f431cd3245f2a71cedf5523dc2b6f8fda6740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Luc=20Peuri=C3=A8re?= Date: Thu, 28 Jun 2007 22:37:38 +0000 Subject: committing Ettore Pasquini MS windows support 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 | 4 ++++ intern/ghost/intern/GHOST_SystemWin32.cpp | 13 +++++++++++++ intern/ghost/make/msvc_7_0/ghost.vcproj | 9 +++++++++ 3 files changed, 26 insertions(+) (limited to 'intern') diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h index 9b8a402a195..0de4c162ab8 100644 --- a/intern/ghost/GHOST_Types.h +++ b/intern/ghost/GHOST_Types.h @@ -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; diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp index ec6d0d355b5..bfd41e29946 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemWin32.cpp @@ -64,10 +64,12 @@ #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 { diff --git a/intern/ghost/make/msvc_7_0/ghost.vcproj b/intern/ghost/make/msvc_7_0/ghost.vcproj index 9d0aef451e7..e5b2e09a678 100644 --- a/intern/ghost/make/msvc_7_0/ghost.vcproj +++ b/intern/ghost/make/msvc_7_0/ghost.vcproj @@ -280,6 +280,9 @@ ECHO Done + + @@ -292,6 +295,9 @@ ECHO Done + + @@ -373,6 +379,9 @@ ECHO Done + + -- cgit v1.2.3