Mercurial > sdl-ios-xcode
changeset 3256:83c87f2b2aab
Fixed bug where minimized windows get zero width/height
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 06 Sep 2009 15:04:38 +0000 |
parents | f8a4214ce90a |
children | 94fb40a4a9a7 |
files | src/video/win32/SDL_win32events.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/video/win32/SDL_win32events.c Sun Sep 06 04:40:54 2009 +0000 +++ b/src/video/win32/SDL_win32events.c Sun Sep 06 15:04:38 2009 +0000 @@ -528,7 +528,10 @@ int w, h; Uint32 window_flags; - GetClientRect(hwnd, &rect); + if (!GetClientRect(hwnd, &rect) || + (rect.right == rect.left && rect.bottom == rect.top)) { + break; + } ClientToScreen(hwnd, (LPPOINT) & rect); ClientToScreen(hwnd, (LPPOINT) & rect + 1);