comparison src/video/gem/SDL_gemevents.c @ 4059:57b017e6aebf SDL-1.2

Simplify setting window title
author Patrice Mandin <patmandin@gmail.com>
date Fri, 13 Jul 2007 16:09:16 +0000
parents c3625a895caf
children 0b4ebec67cad
comparison
equal deleted inserted replaced
4058:eede31c0ca20 4059:57b017e6aebf
165 165
166 SDL_memcpy(gem_previouskeyboard,gem_currentkeyboard,sizeof(gem_previouskeyboard)); 166 SDL_memcpy(gem_previouskeyboard,gem_currentkeyboard,sizeof(gem_previouskeyboard));
167 167
168 /* Refresh window name ? */ 168 /* Refresh window name ? */
169 if (GEM_refresh_name) { 169 if (GEM_refresh_name) {
170 if ( SDL_GetAppState() & SDL_APPACTIVE ) { 170 const char *window_name =
171 /* Fullscreen/windowed */ 171 (SDL_GetAppState() & SDL_APPACTIVE)
172 if (GEM_title_name) { 172 ? GEM_title_name : GEM_icon_name;
173 wind_set(GEM_handle,WF_NAME,(short)(((unsigned long)GEM_title_name)>>16),(short)(((unsigned long)GEM_title_name) & 0xffff),0,0); 173 if (window_name) {
174 } 174 wind_set(GEM_handle,WF_NAME,
175 } else { 175 (short)(((unsigned long)window_name)>>16),
176 /* Iconified */ 176 (short)(((unsigned long)window_name) & 0xffff),
177 if (GEM_icon_name) { 177 0,0);
178 wind_set(GEM_handle,WF_NAME,(short)(((unsigned long)GEM_icon_name)>>16),(short)(((unsigned long)GEM_icon_name) & 0xffff),0,0);
179 }
180 } 178 }
181 GEM_refresh_name = SDL_FALSE; 179 GEM_refresh_name = SDL_FALSE;
182 } 180 }
183 } 181 }
184 182