X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fmswin%2Ffg_state_mswin.c;h=913e113da530a06f8aaddb0a2ef5af6b1aef1585;hb=b304f6f9002f17cc263e06641a92f19ffbfaf062;hp=4c0ca30c2e7e8b4840985c9559d776f2bab7e579;hpb=99d53f15a4216240088132f6af9cb194b519b1cc;p=freeglut diff --git a/src/mswin/fg_state_mswin.c b/src/mswin/fg_state_mswin.c index 4c0ca30..913e113 100644 --- a/src/mswin/fg_state_mswin.c +++ b/src/mswin/fg_state_mswin.c @@ -1,5 +1,5 @@ /* - * freeglut_state_mswin.c + * fg_state_mswin.c * * The Windows-specific state query methods. * @@ -256,7 +256,7 @@ int fgPlatformGlutGet ( GLenum eWhat ) * all other extra pixels are assumed to be atop the window, forming the caption. */ borderWidth = ((winRect.right-winRect.left)-(clientRect.right-clientRect.left))/2; - captionHeight = (winRect.bottom-winRect.top)-(clientRect.bottom-clientRect.top)-borderWidth*2; + captionHeight = (winRect.bottom-winRect.top)-(clientRect.bottom-clientRect.top)-borderWidth; /* include top border in caption height */ switch( eWhat ) { @@ -327,11 +327,9 @@ int fgPlatformGlutDeviceGet ( GLenum eWhat ) default: fgWarning( "glutDeviceGet(): missing enum handle %d", eWhat ); + return -1; break; } - - /* And now -- the failure. */ - return -1; } /* @@ -347,4 +345,4 @@ int *fgPlatformGlutGetModeValues(GLenum eWhat, int *size) { *size = 0; return NULL; -} \ No newline at end of file +}