X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fmswin%2Ffreeglut_window_mswin.c;h=d4c5fd7c3b15e397923d5af659a0104d2e6775d1;hb=6997b7c7c0f5893050492d6a1a7ab6034fb1a392;hp=5a33ec52ced58fb7fce76159076c5a340b5dbb59;hpb=481216ae30a9f573a56774fd7d8a300ab76d7189;p=freeglut diff --git a/src/mswin/freeglut_window_mswin.c b/src/mswin/freeglut_window_mswin.c index 5a33ec5..d4c5fd7 100644 --- a/src/mswin/freeglut_window_mswin.c +++ b/src/mswin/freeglut_window_mswin.c @@ -25,6 +25,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#define FREEGLUT_BUILDING_LIB #include #include "../Common/freeglut_internal.h" @@ -978,10 +979,10 @@ void fgPlatformGlutFullScreen( SFG_Window *win ) /* store current window rect */ - GetWindowRect( win->Window.Handle, &win->State.OldRect ); + GetWindowRect( win->Window.Handle, &win->State.pWState.OldRect ); /* store current window style */ - win->State.OldStyle = s = GetWindowLong(win->Window.Handle, GWL_STYLE); + win->State.pWState.OldStyle = s = GetWindowLong(win->Window.Handle, GWL_STYLE); /* remove decorations from style and add popup style*/ s &= ~WS_OVERLAPPEDWINDOW; @@ -992,7 +993,7 @@ void fgPlatformGlutFullScreen( SFG_Window *win ) /* For fullscreen mode, find the monitor that is covered the most * by the window and get its rect as the resize target. */ - hMonitor= MonitorFromRect(&win->State.OldRect, MONITOR_DEFAULTTONEAREST); + hMonitor= MonitorFromRect(&win->State.pWState.OldRect, MONITOR_DEFAULTTONEAREST); mi.cbSize = sizeof(mi); GetMonitorInfo(hMonitor, &mi); rect = mi.rcMonitor; @@ -1048,16 +1049,16 @@ void fgPlatformGlutLeaveFullScreen( SFG_Window *win ) } /* restore style of window before making it fullscreen */ - SetWindowLong(win->Window.Handle, GWL_STYLE, win->State.OldStyle); + SetWindowLong(win->Window.Handle, GWL_STYLE, win->State.pWState.OldStyle); SetWindowPos(win->Window.Handle, HWND_TOP, 0,0,0,0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED); /* Then resize */ SetWindowPos(win->Window.Handle, HWND_TOP, - win->State.OldRect.left, - win->State.OldRect.top, - win->State.OldRect.right - win->State.OldRect.left, - win->State.OldRect.bottom - win->State.OldRect.top, + win->State.pWState.OldRect.left, + win->State.pWState.OldRect.top, + win->State.pWState.OldRect.right - win->State.pWState.OldRect.left, + win->State.pWState.OldRect.bottom - win->State.pWState.OldRect.top, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSENDCHANGING | SWP_NOZORDER ); @@ -1080,7 +1081,6 @@ void fgPlatformGlutFullScreenToggle( SFG_Window *win ) /* -- PLATFORM-SPECIFIC INTERFACE FUNCTION -------------------------------------------------- */ - int FGAPIENTRY __glutCreateWindowWithExit( const char *title, void (__cdecl *exit_function)(int) ) { __glutExitFunc = exit_function;