minor update making code more compact.
[freeglut] / src / mswin / fg_main_mswin.c
index 97b8363..247312d 100644 (file)
@@ -1545,13 +1545,11 @@ LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPAR
 #endif
        //Added by Jinrong Xie (stonexjr@gmail.com) 12/24/2014
        //for SpaceNavigator support on Windows.
-       /*
-       case WM_ACTIVATEAPP:
-               fgInitialiseSpaceball();
-               break;
-       */
        case WM_INPUT:
-               fgSpaceballHandleWinEvent(hWnd, wParam, lParam);
+               if (fgHasSpaceball())
+               {
+                       fgSpaceballHandleWinEvent(hWnd, wParam, lParam);
+               }
                break;
     default:
         /* Handle unhandled messages */