diff options
author | Jean-Luc Peurière <jlp@nerim.net> | 2007-08-03 00:45:55 +0400 |
---|---|---|
committer | Jean-Luc Peurière <jlp@nerim.net> | 2007-08-03 00:45:55 +0400 |
commit | 1609fd61bcd4acd49d53a46a520baf28c51895c0 (patch) | |
tree | dfc1db92df94b13a17aa10998c5681c72ab87142 /intern/ghost | |
parent | 7965e64e98091fafe733336a0ced252f2503f184 (diff) |
windows ndof support
added by Ettore Pasquini
Diffstat (limited to 'intern/ghost')
-rw-r--r-- | intern/ghost/GHOST_Types.h | 3 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_SystemWin32.cpp | 13 |
2 files changed, 14 insertions, 2 deletions
diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h index 379b3323f53..7b791c44fd8 100644 --- a/intern/ghost/GHOST_Types.h +++ b/intern/ghost/GHOST_Types.h @@ -40,7 +40,8 @@ typedef int GHOST_TInt32; typedef unsigned int GHOST_TUns32; #ifdef WIN32 -#define WM_BLND_3DX WM_USER + 1 +#define WM_BLND_NDOF_AXIS WM_USER + 1 +#define WM_BLND_NDOF_BTN WM_USER + 2 #endif #if defined(WIN32) && !defined(FREE_WINDOWS) diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp index 89a96987113..5f4bfe9d668 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemWin32.cpp @@ -843,7 +843,7 @@ 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: + case WM_BLND_NDOF_AXIS: { GHOST_TEventNDOFData ndofdata; system->m_ndofManager->GHOST_NDOFGetDatas(ndofdata); @@ -854,6 +854,17 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam, window, ndofdata)); } break; + case WM_BLND_NDOF_BTN: + { + GHOST_TEventNDOFData ndofdata; + system->m_ndofManager->GHOST_NDOFGetDatas(ndofdata); + system->m_eventManager-> + pushEvent(new GHOST_EventNDOF( + system->getMilliSeconds(), + GHOST_kEventNDOFButton, + window, ndofdata)); + } + break; } } else { |