From 345ce8f5f0aceefa1a614e8228dec4bf90ee6328 Mon Sep 17 00:00:00 2001 From: phintuka Date: Wed, 18 Oct 2006 13:00:09 +0000 Subject: Show DVD SPU language in hotkey status messages --- menu.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/menu.c b/menu.c index 89f7010c..26d58c91 100644 --- a/menu.c +++ b/menu.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: menu.c,v 1.18 2006-10-13 12:48:34 phintuka Exp $ + * $Id: menu.c,v 1.19 2006-10-18 13:00:09 phintuka Exp $ * */ @@ -674,6 +674,10 @@ void cMenuXinelib::Store(void) xc.headphone = headphone; } +#if APIVERSNUM < 10404 +# warning Using hotkeys may segfault with VDR version < 1.4.3-2 +#endif + eOSState cMenuXinelib::ProcessHotkey(eKeys Key) { eOSState NewState = osEnd; @@ -705,9 +709,16 @@ eOSState cMenuXinelib::ProcessHotkey(eKeys Key) current = -1; cXinelibDevice::Instance().SetCurrentDvdSpuTrack(current); } - asprintf(&Message, "%s %s %d", tr("DVD SPU Track"), - OnlyInfo ? ":" : "->", - current); + const char *lang = cXinelibDevice::Instance().GetDvdSpuLang(current); + if(current == -1) lang = "default"; + if(lang && lang[0]) + asprintf(&Message, "%s %s %s (%d)", tr("DVD SPU Track"), + OnlyInfo ? ":" : "->", + lang, current); + else + asprintf(&Message, "%s %s %d", tr("DVD SPU Track"), + OnlyInfo ? ":" : "->", + current); } break; -- cgit v1.2.3