Mercurial > sdl-ios-xcode
diff src/video/SDL_video.c @ 2849:523b10db69f8
There's no reason to add extra code to notify the mice of window size changes.
Just query the window size when we care about it. :)
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 07 Dec 2008 21:53:28 +0000 |
parents | e841aa93e6be |
children | 99210400e8b9 |
line wrap: on
line diff
--- a/src/video/SDL_video.c Sun Dec 07 07:16:40 2008 +0000 +++ b/src/video/SDL_video.c Sun Dec 07 21:53:28 2008 +0000 @@ -1046,6 +1046,7 @@ if (_this->SetWindowSize) { _this->SetWindowSize(_this, window); } + SDL_OnWindowResized(window); } void @@ -1054,13 +1055,19 @@ SDL_Window *window = SDL_GetWindowFromID(windowID); if (!window) { - return; - } - if (w) { - *w = window->w; - } - if (h) { - *h = window->h; + if (w) { + *w = window->w; + } + if (h) { + *h = window->h; + } + } else { + if (w) { + *w = 0; + } + if (h) { + *h = 0; + } } }