Skip to content

Commit

Permalink
Fixed bug #258
Browse files Browse the repository at this point in the history
Account for the menu height in AdjustWindowRectEx()
  • Loading branch information
slouken committed Jun 24, 2006
1 parent f32551b commit 55ab63d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/video/windib/SDL_dibvideo.c
Expand Up @@ -785,7 +785,7 @@ SDL_Surface *DIB_SetVideoMode(_THIS, SDL_Surface *current,
bounds.top = SDL_windowY;
bounds.right = SDL_windowX+video->w;
bounds.bottom = SDL_windowY+video->h;
AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), FALSE, 0);
AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), (GetMenu(SDL_Window) != NULL), 0);
width = bounds.right-bounds.left;
height = bounds.bottom-bounds.top;
if ( (flags & SDL_FULLSCREEN) ) {
Expand Down
6 changes: 3 additions & 3 deletions src/video/windx5/SDL_dx5video.c
Expand Up @@ -1195,7 +1195,7 @@ SDL_Surface *DX5_SetVideoMode(_THIS, SDL_Surface *current,
bounds.top = SDL_windowY;
bounds.right = SDL_windowX+video->w;
bounds.bottom = SDL_windowY+video->h;
AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), FALSE, 0);
AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), (GetMenu(SDL_Window) != NULL), 0);
width = bounds.right-bounds.left;
height = bounds.bottom-bounds.top;
if ( (flags & SDL_FULLSCREEN) ) {
Expand Down Expand Up @@ -1281,7 +1281,7 @@ SDL_Surface *DX5_SetVideoMode(_THIS, SDL_Surface *current,
bounds.top = 0;
bounds.right = GetSystemMetrics(SM_CXSCREEN);
bounds.bottom = GetSystemMetrics(SM_CYSCREEN);
AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), FALSE, 0);
AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), (GetMenu(SDL_Window) != NULL), 0);
SetWindowPos(SDL_Window, HWND_TOPMOST,
bounds.left, bounds.top,
bounds.right - bounds.left,
Expand Down Expand Up @@ -1598,7 +1598,7 @@ SDL_Surface *DX5_SetVideoMode(_THIS, SDL_Surface *current,
bounds.top = SDL_windowY;
bounds.right = SDL_windowX+video->w;
bounds.bottom = SDL_windowY+video->h;
AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), FALSE, 0);
AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), (GetMenu(SDL_Window) != NULL), 0);
width = bounds.right-bounds.left;
height = bounds.bottom-bounds.top;
if ( center ) {
Expand Down

0 comments on commit 55ab63d

Please sign in to comment.