src/SDL_compat.c
changeset 2037 6bb97f41ab4b
parent 1985 8055185ae4ed
child 2058 38148947fdcf
equal deleted inserted replaced
2036:12ef90a41631 2037:6bb97f41ab4b
   690 void
   690 void
   691 SDL_WM_SetCaption(const char *title, const char *icon)
   691 SDL_WM_SetCaption(const char *title, const char *icon)
   692 {
   692 {
   693     if (wm_title) {
   693     if (wm_title) {
   694         SDL_free(wm_title);
   694         SDL_free(wm_title);
       
   695     }
       
   696     if (title) {
       
   697         wm_title = SDL_strdup(title);
   695     } else {
   698     } else {
   696         wm_title = SDL_strdup(title);
   699         wm_title = NULL;
   697     }
   700     }
   698     SDL_SetWindowTitle(SDL_VideoWindow, wm_title);
   701     SDL_SetWindowTitle(SDL_VideoWindow, wm_title);
   699 }
   702 }
   700 
   703 
   701 void
   704 void
   702 SDL_WM_GetCaption(char **title, char **icon)
   705 SDL_WM_GetCaption(const char **title, const char **icon)
   703 {
   706 {
   704     if (title) {
   707     if (title) {
   705         *title = wm_title;
   708         *title = wm_title;
   706     }
   709     }
   707     if (icon) {
   710     if (icon) {