Added support for 3Dconnexion Space Navigator.

(cherry picked from commit 5c1e897f1a)

(cherry picked from commit 5c1e897f1a)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1760 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
dcnieho 2015-06-29 10:09:00 +00:00
parent c2384ac19e
commit b593d219d6

View File

@ -30,6 +30,8 @@
*/ */
/* /*
* Modified by Jinrong Xie (stonexjr@gmail.com) 12/24/2014
* for Space Navigator support on Windows.
* This code is enhanced by at least supporting 3Dconnexion's * This code is enhanced by at least supporting 3Dconnexion's
* six degree of freedom navigator. * six degree of freedom navigator.
*/ */
@ -68,8 +70,6 @@ void fgPlatformInitializeSpaceball(void)
__fgSpaceball.hwndTarget = NULL; __fgSpaceball.hwndTarget = NULL;
sball_initialized = 0; sball_initialized = 0;
} }
return;
} }
void fgPlatformSpaceballClose(void) void fgPlatformSpaceballClose(void)
@ -94,6 +94,7 @@ void fgPlatformSpaceballSetWindow(SFG_Window *window)
int fgIsSpaceballWinEvent(HWND hwnd, WPARAM wParam, LPARAM lParam) int fgIsSpaceballWinEvent(HWND hwnd, WPARAM wParam, LPARAM lParam)
{ {
return 0;
} }
void fgSpaceballHandleWinEvent(HWND hwnd, WPARAM wParam, LPARAM lParam) void fgSpaceballHandleWinEvent(HWND hwnd, WPARAM wParam, LPARAM lParam)
@ -101,7 +102,6 @@ void fgSpaceballHandleWinEvent(HWND hwnd, WPARAM wParam, LPARAM lParam)
#define LOGITECH_VENDOR_ID 0x46d #define LOGITECH_VENDOR_ID 0x46d
HRAWINPUT hRawInput = (HRAWINPUT)lParam; HRAWINPUT hRawInput = (HRAWINPUT)lParam;
UINT inputCode = (UINT)wParam; UINT inputCode = (UINT)wParam;
RAWINPUTHEADER hdr;
UINT size; UINT size;
BYTE *rawInputBuffer; BYTE *rawInputBuffer;
PRAWINPUT pRawInput; PRAWINPUT pRawInput;