Mercurial > sdl-ios-xcode
comparison src/video/uikit/SDL_uikitappdelegate.m @ 5256:1b0de3574c58
Fixed compile in Xcode
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 11 Feb 2011 10:18:34 -0800 |
parents | 5f09cb749d75 |
children | b530ef003506 |
comparison
equal
deleted
inserted
replaced
5255:f908e06b3c96 | 5256:1b0de3574c58 |
---|---|
108 // Send every window on every screen a MINIMIZED event. | 108 // Send every window on every screen a MINIMIZED event. |
109 SDL_VideoDevice *_this = SDL_GetVideoDevice(); | 109 SDL_VideoDevice *_this = SDL_GetVideoDevice(); |
110 if (!_this) { | 110 if (!_this) { |
111 return; | 111 return; |
112 } | 112 } |
113 | 113 |
114 int i; | 114 SDL_Window *window; |
115 for (i = 0; i < _this->num_displays; i++) { | 115 for (window = _this->windows; window != nil; window = window->next) { |
116 const SDL_VideoDisplay *display = &_this->displays[i]; | 116 SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MINIMIZED, 0, 0); |
117 SDL_Window *window; | |
118 for (window = display->windows; window != nil; window = window->next) { | |
119 SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MINIMIZED, 0, 0); | |
120 } | |
121 } | 117 } |
122 } | 118 } |
123 | 119 |
124 - (void) applicationDidBecomeActive:(UIApplication*)application | 120 - (void) applicationDidBecomeActive:(UIApplication*)application |
125 { | 121 { |
128 // Send every window on every screen a RESTORED event. | 124 // Send every window on every screen a RESTORED event. |
129 SDL_VideoDevice *_this = SDL_GetVideoDevice(); | 125 SDL_VideoDevice *_this = SDL_GetVideoDevice(); |
130 if (!_this) { | 126 if (!_this) { |
131 return; | 127 return; |
132 } | 128 } |
133 | 129 |
134 int i; | 130 SDL_Window *window; |
135 for (i = 0; i < _this->num_displays; i++) { | 131 for (window = _this->windows; window != nil; window = window->next) { |
136 const SDL_VideoDisplay *display = &_this->displays[i]; | 132 SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESTORED, 0, 0); |
137 SDL_Window *window; | |
138 for (window = display->windows; window != nil; window = window->next) { | |
139 SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESTORED, 0, 0); | |
140 } | |
141 } | 133 } |
142 } | 134 } |
143 | 135 |
144 @end | 136 @end |
145 | 137 |