comparison src/video/gem/SDL_gemevents.c @ 2186:6fe43f7efd94

Simplify setting window title
author Patrice Mandin <patmandin@gmail.com>
date Fri, 13 Jul 2007 16:11:58 +0000
parents adf732f1f016
children f54670a477bb
comparison
equal deleted inserted replaced
2185:2032348afed1 2186:6fe43f7efd94
154 SDL_memcpy(gem_previouskeyboard, gem_currentkeyboard, 154 SDL_memcpy(gem_previouskeyboard, gem_currentkeyboard,
155 sizeof(gem_previouskeyboard)); 155 sizeof(gem_previouskeyboard));
156 156
157 /* Refresh window name ? */ 157 /* Refresh window name ? */
158 if (GEM_refresh_name) { 158 if (GEM_refresh_name) {
159 if (SDL_GetAppState() & SDL_APPACTIVE) { 159 const char *window_name = (SDL_GetAppState() & SDL_APPACTIVE) ?
160 /* Fullscreen/windowed */ 160 GEM_title_name : GEM_icon_name;
161 if (GEM_title_name) { 161 if (window_name) {
162 wind_set(GEM_handle, WF_NAME, 162 wind_set(GEM_handle, WF_NAME,
163 (short) (((unsigned long) GEM_title_name) >> 163 (short) (((unsigned long) window_name) >> 16),
164 16), 164 (short) (((unsigned long) window_name) & 0xffff), 0, 0);
165 (short) (((unsigned long) GEM_title_name) &
166 0xffff), 0, 0);
167 }
168 } else {
169 /* Iconified */
170 if (GEM_icon_name) {
171 wind_set(GEM_handle, WF_NAME,
172 (short) (((unsigned long) GEM_icon_name) >>
173 16),
174 (short) (((unsigned long) GEM_icon_name) &
175 0xffff), 0, 0);
176 }
177 } 165 }
178 GEM_refresh_name = SDL_FALSE; 166 GEM_refresh_name = SDL_FALSE;
179 } 167 }
180 } 168 }
181 169