summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-02-20 13:39:49 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2005-02-20 13:39:49 +0100
commite8bd7c2369dfba7c9709fb6589a985c8e0448bf6 (patch)
treeda3d8eaa91ee8b3ccaa7fb4580d4164f44920056 /menu.c
parent51f41252cf70ab0364a411648ed0aa2015e40162 (diff)
downloadvdr-e8bd7c2369dfba7c9709fb6589a985c8e0448bf6.tar.gz
vdr-e8bd7c2369dfba7c9709fb6589a985c8e0448bf6.tar.bz2
Implemented setup option "DVB/Video display format"
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/menu.c b/menu.c
index a438b799..56a74b79 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.c 1.340 2005/02/06 11:33:13 kls Exp $
+ * $Id: menu.c 1.341 2005/02/20 13:39:49 kls Exp $
*/
#include "menu.h"
@@ -1915,6 +1915,7 @@ private:
int originalNumAudioLanguages;
int numAudioLanguages;
void Setup(void);
+ const char *videoDisplayFormatTexts[3];
const char *updateChannelsTexts[5];
public:
cMenuSetupDVB(void);
@@ -1926,6 +1927,9 @@ cMenuSetupDVB::cMenuSetupDVB(void)
for (numAudioLanguages = 0; numAudioLanguages < I18nNumLanguages && data.AudioLanguages[numAudioLanguages] >= 0; numAudioLanguages++)
;
originalNumAudioLanguages = numAudioLanguages;
+ videoDisplayFormatTexts[0] = tr("pan&scan");
+ videoDisplayFormatTexts[1] = tr("letterbox");
+ videoDisplayFormatTexts[2] = tr("center cut out");
updateChannelsTexts[0] = tr("no");
updateChannelsTexts[1] = tr("names only");
updateChannelsTexts[2] = tr("names and PIDs");
@@ -1943,6 +1947,7 @@ void cMenuSetupDVB::Setup(void)
Clear();
Add(new cMenuEditIntItem( tr("Setup.DVB$Primary DVB interface"), &data.PrimaryDVB, 1, cDevice::NumDevices()));
+ Add(new cMenuEditStraItem(tr("Setup.DVB$Video display format"), &data.VideoDisplayFormat, 3, videoDisplayFormatTexts));
Add(new cMenuEditBoolItem(tr("Setup.DVB$Video format"), &data.VideoFormat, "4:3", "16:9"));
Add(new cMenuEditBoolItem(tr("Setup.DVB$Use Dolby Digital"), &data.UseDolbyDigital));
Add(new cMenuEditStraItem(tr("Setup.DVB$Update channels"), &data.UpdateChannels, 5, updateChannelsTexts));
@@ -1957,6 +1962,7 @@ void cMenuSetupDVB::Setup(void)
eOSState cMenuSetupDVB::ProcessKey(eKeys Key)
{
int oldPrimaryDVB = ::Setup.PrimaryDVB;
+ int oldVideoDisplayFormat = ::Setup.VideoDisplayFormat;
bool oldVideoFormat = ::Setup.VideoFormat;
int oldnumAudioLanguages = numAudioLanguages;
eOSState state = cMenuSetupBase::ProcessKey(Key);
@@ -1984,6 +1990,8 @@ eOSState cMenuSetupDVB::ProcessKey(eKeys Key)
if (state == osBack && Key == kOk) {
if (::Setup.PrimaryDVB != oldPrimaryDVB)
state = osSwitchDvb;
+ if (::Setup.VideoDisplayFormat != oldVideoDisplayFormat)
+ cDevice::PrimaryDevice()->SetVideoDisplayFormat(eVideoDisplayFormat(::Setup.VideoDisplayFormat));
if (::Setup.VideoFormat != oldVideoFormat)
cDevice::PrimaryDevice()->SetVideoFormat(::Setup.VideoFormat);
}