mirror of
https://github.com/yawut/SDL.git
synced 2026-08-22 00:35:18 -05:00
Simplify setting window title
This commit is contained in:
@@ -156,24 +156,12 @@ GEM_PumpEvents(_THIS)
|
||||
|
||||
/* Refresh window name ? */
|
||||
if (GEM_refresh_name) {
|
||||
if (SDL_GetAppState() & SDL_APPACTIVE) {
|
||||
/* Fullscreen/windowed */
|
||||
if (GEM_title_name) {
|
||||
wind_set(GEM_handle, WF_NAME,
|
||||
(short) (((unsigned long) GEM_title_name) >>
|
||||
16),
|
||||
(short) (((unsigned long) GEM_title_name) &
|
||||
0xffff), 0, 0);
|
||||
}
|
||||
} else {
|
||||
/* Iconified */
|
||||
if (GEM_icon_name) {
|
||||
wind_set(GEM_handle, WF_NAME,
|
||||
(short) (((unsigned long) GEM_icon_name) >>
|
||||
16),
|
||||
(short) (((unsigned long) GEM_icon_name) &
|
||||
0xffff), 0, 0);
|
||||
}
|
||||
const char *window_name = (SDL_GetAppState() & SDL_APPACTIVE) ?
|
||||
GEM_title_name : GEM_icon_name;
|
||||
if (window_name) {
|
||||
wind_set(GEM_handle, WF_NAME,
|
||||
(short) (((unsigned long) window_name) >> 16),
|
||||
(short) (((unsigned long) window_name) & 0xffff), 0, 0);
|
||||
}
|
||||
GEM_refresh_name = SDL_FALSE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user