neutrino: tell the user if no frontend is found

even though there is not much left to do if no frontend is present,
at least the user can be informed about that fact before crashing :-)


Origin commit data
------------------
Commit: aa098a7701
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-01-13 (Sun, 13 Jan 2013)
This commit is contained in:
Stefan Seyfried
2013-01-13 17:42:47 +01:00
parent 91d640b5ef
commit 5449b0a8c3
2 changed files with 11 additions and 1 deletions

View File

@@ -1840,7 +1840,7 @@ fprintf(stderr, "[neutrino start] %d -> %5ld ms\n", __LINE__, time_monotonic_ms
ZapStart_arg.volume = g_settings.current_volume;
/* create decoders, read channels */
CZapit::getInstance()->Start(&ZapStart_arg);
bool zapit_init = CZapit::getInstance()->Start(&ZapStart_arg);
fprintf(stderr, "[neutrino start] %d -> %5ld ms\n", __LINE__, time_monotonic_ms() - starttime);
// init audio settings
@@ -1862,6 +1862,12 @@ fprintf(stderr, "[neutrino start] %d -> %5ld ms\n", __LINE__, time_monotonic_ms
g_RCInput = new CRCInput();
/* later on, we'll crash anyway, so tell about it. */
if (! zapit_init)
ShowMsgUTF(LOCALE_MESSAGEBOX_INFO,
"Zapit initialization failed.\nThis is a fatal error, sorry.",
CMessageBox::mbrBack, CMessageBox::mbBack);
InitZapitClient();
g_Zapit->setStandby(false);