update CMake file so that it will generate proper _WIN32_WINNT and WINVER definitions...
[freeglut] / src / mswin / fg_main_mswin.c
index 97b8363..20a635b 100644 (file)
@@ -1543,16 +1543,16 @@ LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPAR
                break;
        }
 #endif
-       //Added by Jinrong Xie (stonexjr@gmail.com) 12/24/2014
-       //for SpaceNavigator support on Windows.
-       /*
-       case WM_ACTIVATEAPP:
-               fgInitialiseSpaceball();
-               break;
-       */
+
+#ifdef WM_INPUT
        case WM_INPUT:
-               fgSpaceballHandleWinEvent(hWnd, wParam, lParam);
+        /* Added by Jinrong Xie <stonexjr at gmail.com> for SpaceNavigator support on Windows. Dec 2014 */
+               if (fgHasSpaceball())
+               {
+                       fgSpaceballHandleWinEvent(hWnd, wParam, lParam);
+               }
                break;
+#endif
     default:
         /* Handle unhandled messages */
         lRet = DefWindowProc( hWnd, uMsg, wParam, lParam );