hd51/h7/bre2ze4k: check for boxmode 12 for activating PiP

Origin commit data
------------------
Commit: 85ce73e2c3
Author: BPanther <bpanther_ts@hotmail.com>
Date: 2021-03-13 (Sat, 13 Mar 2021)
This commit is contained in:
BPanther
2021-03-13 23:21:45 +01:00
committed by vanhofen
parent 655d62b5e2
commit 4e6bfa4c1e
5 changed files with 27 additions and 0 deletions

View File

@@ -3355,11 +3355,34 @@ void CNeutrinoApp::RealRun()
}
#ifdef ENABLE_PIP
else if (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 {
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;