Fixing the build after Diederick Niehorster's full screen fixes: they are only valid for WINVER >= 0x0500.

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@930 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
fayjf 2011-09-04 19:58:20 +00:00
parent cf91891cf8
commit 8c65b376ac

View File

@ -2000,6 +2000,7 @@ void FGAPIENTRY glutFullScreen( void )
} }
{ {
#if(WINVER >= 0x0500)
DWORD s; DWORD s;
RECT rect; RECT rect;
HMONITOR hMonitor; HMONITOR hMonitor;
@ -2031,6 +2032,23 @@ void FGAPIENTRY glutFullScreen( void )
mi.cbSize = sizeof(mi); mi.cbSize = sizeof(mi);
GetMonitorInfo(hMonitor, &mi); GetMonitorInfo(hMonitor, &mi);
rect = mi.rcMonitor; rect = mi.rcMonitor;
#else /* if (WINVER >= 0x0500) */
RECT rect;
/* For fullscreen mode, force the top-left corner to 0,0
* and adjust the window rectangle so that the client area
* covers the whole screen.
*/
rect.left = 0;
rect.top = 0;
get_display_origin(&rect.left,&rect.top);
rect.right = fgDisplay.ScreenWidth+rect.left;
rect.bottom = fgDisplay.ScreenHeight+rect.top;
AdjustWindowRect ( &rect, WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS |
WS_CLIPCHILDREN, FALSE );
#endif /* (WINVER >= 0x0500) */
/* /*
* then resize window * then resize window