PulseAudio: get the window title for the context name if it wasn't set already. SDL-1.2
authorRyan C. Gordon
Sun, 24 Jan 2010 20:08:14 +0000
branchSDL-1.2
changeset 44009134017bac3a
parent 4399 ae9c094e9200
child 4401 1a7b62893c9d
PulseAudio: get the window title for the context name if it wasn't set already.

Will still fall back to get_progname() if it can't figure out the title.
src/audio/pulse/SDL_pulseaudio.c
     1.1 --- a/src/audio/pulse/SDL_pulseaudio.c	Sun Jan 24 17:54:57 2010 +0000
     1.2 +++ b/src/audio/pulse/SDL_pulseaudio.c	Sun Jan 24 20:08:14 2010 +0000
     1.3 @@ -497,7 +497,9 @@
     1.4  	}
     1.5  
     1.6  	if (this->hidden->caption == NULL) {
     1.7 -		this->hidden->caption = SDL_strdup(get_progname());
     1.8 +		char *title = NULL;
     1.9 +		SDL_WM_GetCaption(&title, NULL);
    1.10 +		PULSE_SetCaption(this, title);
    1.11  	}
    1.12  
    1.13  	mainloop_api = SDL_NAME(pa_mainloop_get_api)(mainloop);