Mercurial > sdl-ios-xcode
comparison src/video/windx5/SDL_dx5video.c @ 1882:339d733e3699
Fixed bug #258
Account for the menu height in AdjustWindowRectEx()
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 24 Jun 2006 04:30:01 +0000 |
parents | 5ff2c01e475e |
children | c121d94672cb c75679dce60c |
comparison
equal
deleted
inserted
replaced
1881:61f86f36afb9 | 1882:339d733e3699 |
---|---|
1193 | 1193 |
1194 bounds.left = SDL_windowX; | 1194 bounds.left = SDL_windowX; |
1195 bounds.top = SDL_windowY; | 1195 bounds.top = SDL_windowY; |
1196 bounds.right = SDL_windowX+video->w; | 1196 bounds.right = SDL_windowX+video->w; |
1197 bounds.bottom = SDL_windowY+video->h; | 1197 bounds.bottom = SDL_windowY+video->h; |
1198 AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), FALSE, 0); | 1198 AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), (GetMenu(SDL_Window) != NULL), 0); |
1199 width = bounds.right-bounds.left; | 1199 width = bounds.right-bounds.left; |
1200 height = bounds.bottom-bounds.top; | 1200 height = bounds.bottom-bounds.top; |
1201 if ( (flags & SDL_FULLSCREEN) ) { | 1201 if ( (flags & SDL_FULLSCREEN) ) { |
1202 x = (GetSystemMetrics(SM_CXSCREEN)-width)/2; | 1202 x = (GetSystemMetrics(SM_CXSCREEN)-width)/2; |
1203 y = (GetSystemMetrics(SM_CYSCREEN)-height)/2; | 1203 y = (GetSystemMetrics(SM_CYSCREEN)-height)/2; |
1279 /* Cover up desktop during mode change */ | 1279 /* Cover up desktop during mode change */ |
1280 bounds.left = 0; | 1280 bounds.left = 0; |
1281 bounds.top = 0; | 1281 bounds.top = 0; |
1282 bounds.right = GetSystemMetrics(SM_CXSCREEN); | 1282 bounds.right = GetSystemMetrics(SM_CXSCREEN); |
1283 bounds.bottom = GetSystemMetrics(SM_CYSCREEN); | 1283 bounds.bottom = GetSystemMetrics(SM_CYSCREEN); |
1284 AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), FALSE, 0); | 1284 AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), (GetMenu(SDL_Window) != NULL), 0); |
1285 SetWindowPos(SDL_Window, HWND_TOPMOST, | 1285 SetWindowPos(SDL_Window, HWND_TOPMOST, |
1286 bounds.left, bounds.top, | 1286 bounds.left, bounds.top, |
1287 bounds.right - bounds.left, | 1287 bounds.right - bounds.left, |
1288 bounds.bottom - bounds.top, SWP_NOCOPYBITS); | 1288 bounds.bottom - bounds.top, SWP_NOCOPYBITS); |
1289 ShowWindow(SDL_Window, SW_SHOW); | 1289 ShowWindow(SDL_Window, SW_SHOW); |
1596 | 1596 |
1597 bounds.left = SDL_windowX; | 1597 bounds.left = SDL_windowX; |
1598 bounds.top = SDL_windowY; | 1598 bounds.top = SDL_windowY; |
1599 bounds.right = SDL_windowX+video->w; | 1599 bounds.right = SDL_windowX+video->w; |
1600 bounds.bottom = SDL_windowY+video->h; | 1600 bounds.bottom = SDL_windowY+video->h; |
1601 AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), FALSE, 0); | 1601 AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), (GetMenu(SDL_Window) != NULL), 0); |
1602 width = bounds.right-bounds.left; | 1602 width = bounds.right-bounds.left; |
1603 height = bounds.bottom-bounds.top; | 1603 height = bounds.bottom-bounds.top; |
1604 if ( center ) { | 1604 if ( center ) { |
1605 x = (GetSystemMetrics(SM_CXSCREEN)-width)/2; | 1605 x = (GetSystemMetrics(SM_CXSCREEN)-width)/2; |
1606 y = (GetSystemMetrics(SM_CYSCREEN)-height)/2; | 1606 y = (GetSystemMetrics(SM_CYSCREEN)-height)/2; |