Mercurial > sdl-ios-xcode
comparison 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 |
comparison
equal
deleted
inserted
replaced
2848:8a3aa505ecba | 2849:523b10db69f8 |
---|---|
1044 window->h = h; | 1044 window->h = h; |
1045 | 1045 |
1046 if (_this->SetWindowSize) { | 1046 if (_this->SetWindowSize) { |
1047 _this->SetWindowSize(_this, window); | 1047 _this->SetWindowSize(_this, window); |
1048 } | 1048 } |
1049 SDL_OnWindowResized(window); | |
1049 } | 1050 } |
1050 | 1051 |
1051 void | 1052 void |
1052 SDL_GetWindowSize(SDL_WindowID windowID, int *w, int *h) | 1053 SDL_GetWindowSize(SDL_WindowID windowID, int *w, int *h) |
1053 { | 1054 { |
1054 SDL_Window *window = SDL_GetWindowFromID(windowID); | 1055 SDL_Window *window = SDL_GetWindowFromID(windowID); |
1055 | 1056 |
1056 if (!window) { | 1057 if (!window) { |
1057 return; | 1058 if (w) { |
1058 } | 1059 *w = window->w; |
1059 if (w) { | 1060 } |
1060 *w = window->w; | 1061 if (h) { |
1061 } | 1062 *h = window->h; |
1062 if (h) { | 1063 } |
1063 *h = window->h; | 1064 } else { |
1065 if (w) { | |
1066 *w = 0; | |
1067 } | |
1068 if (h) { | |
1069 *h = 0; | |
1070 } | |
1064 } | 1071 } |
1065 } | 1072 } |
1066 | 1073 |
1067 void | 1074 void |
1068 SDL_ShowWindow(SDL_WindowID windowID) | 1075 SDL_ShowWindow(SDL_WindowID windowID) |