/*
- * freeglut_main_mswin.c
+ * fg_main_mswin.c
*
* The Windows-specific mouse cursor related stuff.
*
break;
}
#endif
+ //Added by Jinrong Xie <stonexjr at gmail.com> 12/24/2014
+ //for SpaceNavigator support on Windows.
+ case WM_INPUT:
+ if (fgHasSpaceball())
+ {
+ fgSpaceballHandleWinEvent(hWnd, wParam, lParam);
+ }
+ break;
default:
/* Handle unhandled messages */
lRet = DefWindowProc( hWnd, uMsg, wParam, lParam );
/* For fullscreen mode, find the monitor that is covered the most
* by the window and get its rect as the resize target.
*/
- GetWindowRect(window->Window.Handle, &rect);
- hMonitor= MonitorFromRect(&rect, MONITOR_DEFAULTTONEAREST);
+ hMonitor= MonitorFromWindow(window->Window.Handle, MONITOR_DEFAULTTONEAREST);
mi.cbSize = sizeof(mi);
GetMonitorInfo(hMonitor, &mi);
rect = mi.rcMonitor;