From 05c415e6256d2ef55da9951292d754086c66cfda Mon Sep 17 00:00:00 2001 From: psperl Date: Sun, 7 Oct 2007 03:10:07 +0000 Subject: [PATCH] Re-Enabling Title display in XMMS git-svn-id: https://projectm.svn.sourceforge.net/svnroot/projectm/trunk@535 6778bc44-b910-0410-a7a0-be141de4315d --- src/projectM-xmms/main.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/projectM-xmms/main.cpp b/src/projectM-xmms/main.cpp index 634f72f67..0986c1a21 100755 --- a/src/projectM-xmms/main.cpp +++ b/src/projectM-xmms/main.cpp @@ -139,6 +139,9 @@ Uint32 get_xmms_title(Uint32 something, void *somethingelse) { if(title && (!last_title || strcmp(last_title,title))) { //globalPM->renderer->title = title; //globalPM->renderer->drawtitle = 1; + + std::string titlepp(title); + globalPM->projectM_setTitle(titlepp); g_free(last_title); last_title = title; } else if(title && last_title != title) { @@ -157,7 +160,7 @@ int capture = 0; int worker_func(void*) { // char projectM_data[1024]; -// SDL_TimerID title_timer = NULL; + SDL_TimerID title_timer = NULL; std::string config_file; config_file = read_config(); ConfigFile config(config_file); @@ -176,7 +179,7 @@ int worker_func(void*) globalPM = new projectM(config_file); SDL_SemPost(sem); - // title_timer = SDL_AddTimer(500, get_xmms_title, NULL); + title_timer = SDL_AddTimer(500, get_xmms_title, NULL); /** Initialise the thread */ // SDL_SemTryWait(sem); while ( SDL_SemValue(sem)==1 ) { @@ -261,8 +264,8 @@ int worker_func(void*) // SDL_SemPost(sem); } - // if(title_timer) - // SDL_RemoveTimer(title_timer); + if(title_timer) + SDL_RemoveTimer(title_timer); delete globalPM;