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.
--- 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);