Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Simplify setting window title
Browse files Browse the repository at this point in the history
  • Loading branch information
pmandin committed Jul 13, 2007
1 parent 6ef70e4 commit c551c85
Showing 1 changed file with 6 additions and 18 deletions.
24 changes: 6 additions & 18 deletions src/video/gem/SDL_gemevents.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit c551c85

Please sign in to comment.