From 5aafadda16f32be4f1df502a3e8df3549d9a028b Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Fri, 13 Jul 2007 16:09:16 +0000 Subject: [PATCH] Simplify setting window title --HG-- branch : SDL-1.2 extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402511 --- src/video/gem/SDL_gemevents.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/video/gem/SDL_gemevents.c b/src/video/gem/SDL_gemevents.c index 0e029eca7..6bcf817da 100644 --- a/src/video/gem/SDL_gemevents.c +++ b/src/video/gem/SDL_gemevents.c @@ -167,16 +167,14 @@ void 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; }