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
------------------
Branch: ni/coolstream
Commit: aa098a7701
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-01-13 (Sun, 13 Jan 2013)



------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2013-01-13 17:42:47 +01:00
parent 1953df14c2
commit c278fca4e9
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);

View File

@@ -2140,6 +2140,10 @@ bool CZapit::Start(Z_start_arg *ZapStart_arg)
CFEManager::getInstance()->Init();
live_fe = CFEManager::getInstance()->getFE(0);
if (live_fe == NULL) /* no frontend found? */
return false;
/* load configuration or set defaults if no configuration file exists */
video_mode = ZapStart_arg->video_mode;
current_volume = ZapStart_arg->volume;