Added support for 3Dconnexion Space Navigator.

This commit is contained in:
Jinrong Xie 2014-12-24 03:47:10 -08:00
parent 857105a0b4
commit 5c1e897f1a

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;