projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
minor update making code more compact.
[freeglut]
/
src
/
mswin
/
fg_main_mswin.c
diff --git
a/src/mswin/fg_main_mswin.c
b/src/mswin/fg_main_mswin.c
index
55280f1
..
247312d
100644
(file)
--- a/
src/mswin/fg_main_mswin.c
+++ b/
src/mswin/fg_main_mswin.c
@@
-1,5
+1,5
@@
/*
/*
- * freeglut_main_mswin.c
+ * fg_main_mswin.c
*
* The Windows-specific mouse cursor related stuff.
*
*
* The Windows-specific mouse cursor related stuff.
*
@@
-1543,6
+1543,14
@@
LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPAR
break;
}
#endif
break;
}
#endif
+ //Added by Jinrong Xie (stonexjr@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 );
default:
/* Handle unhandled messages */
lRet = DefWindowProc( hWnd, uMsg, wParam, lParam );
@@
-1640,8
+1648,7
@@
void fgPlatformPosResZordWork(SFG_Window* window, unsigned int workMask)
/* For fullscreen mode, find the monitor that is covered the most
* by the window and get its rect as the resize target.
*/
/* 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;
mi.cbSize = sizeof(mi);
GetMonitorInfo(hMonitor, &mi);
rect = mi.rcMonitor;