Mercurial > sdl-ios-xcode
comparison src/video/windx5/SDL_dx5video.c @ 1705:fc731a7d83ed SDL-1.3
Merged fix for bug #258 from SDL 1.2
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 24 Jun 2006 04:31:42 +0000 |
parents | 4da1ee79c9af |
children |
comparison
equal
deleted
inserted
replaced
1704:03fb364e3283 | 1705:fc731a7d83ed |
---|---|
1223 | 1223 |
1224 bounds.left = SDL_windowX; | 1224 bounds.left = SDL_windowX; |
1225 bounds.top = SDL_windowY; | 1225 bounds.top = SDL_windowY; |
1226 bounds.right = SDL_windowX + video->w; | 1226 bounds.right = SDL_windowX + video->w; |
1227 bounds.bottom = SDL_windowY + video->h; | 1227 bounds.bottom = SDL_windowY + video->h; |
1228 AdjustWindowRectEx(&bounds, | 1228 AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), |
1229 GetWindowLong(SDL_Window, GWL_STYLE), | 1229 (GetMenu(SDL_Window) != NULL), 0); |
1230 FALSE, 0); | |
1231 width = bounds.right - bounds.left; | 1230 width = bounds.right - bounds.left; |
1232 height = bounds.bottom - bounds.top; | 1231 height = bounds.bottom - bounds.top; |
1233 if ((flags & SDL_FULLSCREEN)) { | 1232 if ((flags & SDL_FULLSCREEN)) { |
1234 x = (GetSystemMetrics(SM_CXSCREEN) - width) / 2; | 1233 x = (GetSystemMetrics(SM_CXSCREEN) - width) / 2; |
1235 y = (GetSystemMetrics(SM_CYSCREEN) - height) / 2; | 1234 y = (GetSystemMetrics(SM_CYSCREEN) - height) / 2; |
1313 bounds.left = 0; | 1312 bounds.left = 0; |
1314 bounds.top = 0; | 1313 bounds.top = 0; |
1315 bounds.right = GetSystemMetrics(SM_CXSCREEN); | 1314 bounds.right = GetSystemMetrics(SM_CXSCREEN); |
1316 bounds.bottom = GetSystemMetrics(SM_CYSCREEN); | 1315 bounds.bottom = GetSystemMetrics(SM_CYSCREEN); |
1317 AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), | 1316 AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), |
1318 FALSE, 0); | 1317 (GetMenu(SDL_Window) != NULL), 0); |
1319 SetWindowPos(SDL_Window, HWND_TOPMOST, bounds.left, bounds.top, | 1318 SetWindowPos(SDL_Window, HWND_TOPMOST, bounds.left, bounds.top, |
1320 bounds.right - bounds.left, | 1319 bounds.right - bounds.left, bounds.bottom - bounds.top, |
1321 bounds.bottom - bounds.top, SWP_NOCOPYBITS); | 1320 SWP_NOCOPYBITS); |
1322 ShowWindow(SDL_Window, SW_SHOW); | 1321 ShowWindow(SDL_Window, SW_SHOW); |
1323 while (GetForegroundWindow() != SDL_Window) { | 1322 while (GetForegroundWindow() != SDL_Window) { |
1324 SetForegroundWindow(SDL_Window); | 1323 SetForegroundWindow(SDL_Window); |
1325 SDL_Delay(100); | 1324 SDL_Delay(100); |
1326 } | 1325 } |
1633 | 1632 |
1634 bounds.left = SDL_windowX; | 1633 bounds.left = SDL_windowX; |
1635 bounds.top = SDL_windowY; | 1634 bounds.top = SDL_windowY; |
1636 bounds.right = SDL_windowX + video->w; | 1635 bounds.right = SDL_windowX + video->w; |
1637 bounds.bottom = SDL_windowY + video->h; | 1636 bounds.bottom = SDL_windowY + video->h; |
1638 AdjustWindowRectEx(&bounds, | 1637 AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), |
1639 GetWindowLong(SDL_Window, GWL_STYLE), | 1638 (GetMenu(SDL_Window) != NULL), 0); |
1640 FALSE, 0); | |
1641 width = bounds.right - bounds.left; | 1639 width = bounds.right - bounds.left; |
1642 height = bounds.bottom - bounds.top; | 1640 height = bounds.bottom - bounds.top; |
1643 if (center) { | 1641 if (center) { |
1644 x = (GetSystemMetrics(SM_CXSCREEN) - width) / 2; | 1642 x = (GetSystemMetrics(SM_CXSCREEN) - width) / 2; |
1645 y = (GetSystemMetrics(SM_CYSCREEN) - height) / 2; | 1643 y = (GetSystemMetrics(SM_CYSCREEN) - height) / 2; |