diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 800c8b341..aeab361be 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -926,41 +926,32 @@ int CChannelList::show() #ifdef ENABLE_PIP else if (!empty && ((msg == CRCInput::RC_play) || (msg == CRCInput::RC_playpause) || (msg == (neutrino_msg_t) g_settings.key_pip_close))) { #if BOXMODEL_BRE2ZE4K || BOXMODEL_HD51 || BOXMODEL_H7 - bool bm12=false; - FILE *f = fopen("/proc/cmdline", "r"); - if (f) { - char buf[256] = ""; - while(fgets(buf, sizeof(buf), f) != NULL) { - if (strstr(buf, "boxmode=12") != NULL) { - bm12=true; - } - } - fclose(f); - } - if (!bm12) { - ShowMsg(LOCALE_MESSAGEBOX_ERROR, LOCALE_BOXMODE12_NOT_ACTIVATED, CMsgBox::mbrOk, CMsgBox::mbOk, NEUTRINO_ICON_ERROR); - } else { - if(SameTP()) { - if (CZapit::getInstance()->GetPipChannelID() == (*chanlist)[selected]->getChannelID()) { - g_Zapit->stopPip(); - calcSize(); - paintBody(); - } else { - handleMsg(NeutrinoMessages::EVT_PROGRAMLOCKSTATUS, 0x100, true); - } + bool bm12=false; + FILE *f = fopen("/proc/cmdline", "r"); + if (f) { + char buf[256] = ""; + while(fgets(buf, sizeof(buf), f) != NULL) { + if (strstr(buf, "boxmode=12") != NULL) { + bm12=true; } } -#else - if(SameTP()) { - if (CZapit::getInstance()->GetPipChannelID() == (*chanlist)[selected]->getChannelID()) { - g_Zapit->stopPip(); - calcSize(); - paintBody(); - } else { - handleMsg(NeutrinoMessages::EVT_PROGRAMLOCKSTATUS, 0x100, true); + fclose(f); + } + if (!bm12) + ShowMsg(LOCALE_MESSAGEBOX_ERROR, LOCALE_BOXMODE12_NOT_ACTIVATED, CMsgBox::mbrOk, CMsgBox::mbOk, NEUTRINO_ICON_ERROR); + else +#endif + { + if(SameTP()) { + if (CZapit::getInstance()->GetPipChannelID() == (*chanlist)[selected]->getChannelID()) { + g_Zapit->stopPip(); + calcSize(); + paintBody(); + } else { + handleMsg(NeutrinoMessages::EVT_PROGRAMLOCKSTATUS, 0x100, true); + } } } -#endif } #endif else if (!empty && ((msg == CRCInput::RC_info) || (msg == CRCInput::RC_help))) { diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 54343a68f..47239109e 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -3291,22 +3291,17 @@ void CNeutrinoApp::RealRun() } fclose(f); } - if (!bm12) { + if (!bm12) ShowMsg(LOCALE_MESSAGEBOX_ERROR, LOCALE_BOXMODE12_NOT_ACTIVATED, CMsgBox::mbrOk, CMsgBox::mbOk, NEUTRINO_ICON_ERROR); - } else { + else +#endif + { t_channel_id pip_channel_id = CZapit::getInstance()->GetPipChannelID(); if (pip_channel_id) g_Zapit->stopPip(); else StartPip(CZapit::getInstance()->GetCurrentChannelID()); } -#else - t_channel_id pip_channel_id = CZapit::getInstance()->GetPipChannelID(); - if (pip_channel_id) - g_Zapit->stopPip(); - else - StartPip(CZapit::getInstance()->GetCurrentChannelID()); -#endif } else if (msg == (neutrino_msg_t) g_settings.key_pip_setup) { CPipSetup pipsetup;