PulseAudio: get the window title for the context name if it wasn't set already. SDL-1.2
authorRyan C. Gordon <icculus@icculus.org>
Sun, 24 Jan 2010 20:08:14 +0000
branchSDL-1.2
changeset 4400 9134017bac3a
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
--- a/src/audio/pulse/SDL_pulseaudio.c	Sun Jan 24 17:54:57 2010 +0000
+++ b/src/audio/pulse/SDL_pulseaudio.c	Sun Jan 24 20:08:14 2010 +0000
@@ -497,7 +497,9 @@
 	}
 
 	if (this->hidden->caption == NULL) {
-		this->hidden->caption = SDL_strdup(get_progname());
+		char *title = NULL;
+		SDL_WM_GetCaption(&title, NULL);
+		PULSE_SetCaption(this, title);
 	}
 
 	mainloop_api = SDL_NAME(pa_mainloop_get_api)(mainloop);