X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/a568c76b75e987a33d2f7a65aa483447cf55e442..812cf012acb92112b4f5f3bc6d2728c23448934b:/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py diff --git a/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py b/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py index 095e94c0..512bcec3 100644 --- a/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py +++ b/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py @@ -7,6 +7,7 @@ from Components.Pixmap import Pixmap, MovingPixmap, MultiPixmap from Components.config import config, ConfigBoolean, configfile from Tools.Directories import resolveFilename, SCOPE_PLUGINS +from Tools.HardwareInfo import HardwareInfo config.misc.showtestcard = ConfigBoolean(default = False) @@ -75,11 +76,16 @@ class VideoWizard(WizardLanguage, Rc): configfile.save() def listInputChannels(self): + hw_type = HardwareInfo().get_device_name() list = [] for port in self.hw.getPortList(): if self.hw.isPortUsed(port): - list.append((port,port)) + descr = port + if descr == 'DVI' and hw_type == 'dm500hd': + descr = 'HDMI' + if port != "DVI-PC": + list.append((descr,port)) list.sort(key = lambda x: x[0]) print "listInputChannels:", list return list @@ -100,8 +106,9 @@ class VideoWizard(WizardLanguage, Rc): modeList = self.hw.getModeList(self.selection) print "modeList:", modeList self.port = port - ratesList = self.listRates(modeList[0][0]) - self.hw.setMode(port = port, mode = modeList[0][0], rate = ratesList[0][0]) + if (len(modeList) > 0): + ratesList = self.listRates(modeList[0][0]) + self.hw.setMode(port = port, mode = modeList[0][0], rate = ratesList[0][0]) def listModes(self): list = [] @@ -124,8 +131,12 @@ class VideoWizard(WizardLanguage, Rc): def modeSelect(self, mode): ratesList = self.listRates(mode) print "ratesList:", ratesList - self.hw.setMode(port = self.port, mode = mode, rate = ratesList[0][0]) - + if self.port == "DVI" and mode in ("720p", "1080i"): + self.rate = "multi" + self.hw.setMode(port = self.port, mode = mode, rate = "multi") + else: + self.hw.setMode(port = self.port, mode = mode, rate = ratesList[0][0]) + def listRates(self, querymode = None): if querymode is None: querymode = self.mode @@ -165,7 +176,7 @@ class VideoWizard(WizardLanguage, Rc): config.misc.showtestcard.value = False def keyNumberGlobal(self, number): - if number in [1,2,3]: + if number in (1,2,3): if number == 1: self.hw.saveMode("DVI", "720p", "multi") elif number == 2: