git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'bug_533_fix_crash_on_satconfig_close'
[enigma2.git]
/
lib
/
python
/
Plugins
/
SystemPlugins
/
Videomode
/
VideoHardware.py
diff --git
a/lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py
b/lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py
index 71529a037b569db725229b23bc12a56ab48dc5c6..59c50476e6551d43cf76c59fd733b101a96bf49d 100644
(file)
--- a/
lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py
+++ b/
lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py
@@
-2,6
+2,7
@@
from enigma import eTimer
from Components.config import config, ConfigSelection, ConfigSubDict, ConfigYesNo
from Tools.CList import CList
from Components.config import config, ConfigSelection, ConfigSubDict, ConfigYesNo
from Tools.CList import CList
+from Tools.HardwareInfo import HardwareInfo
# The "VideoHardware" is the interface to /proc/stb/video.
# It generates hotplug events, and gives you the list of
# The "VideoHardware" is the interface to /proc/stb/video.
# It generates hotplug events, and gives you the list of
@@
-228,20
+229,29
@@
class VideoHardware:
return res
def createConfig(self, *args):
return res
def createConfig(self, *args):
- # create list of output ports
- portlist = self.getPortList()
+ hw_type = HardwareInfo().get_device_name()
+ lst = []
- # create list of available modes
- config.av.videoport = ConfigSelection(choices = [(port, _(port)) for port in portlist])
config.av.videomode = ConfigSubDict()
config.av.videorate = ConfigSubDict()
config.av.videomode = ConfigSubDict()
config.av.videorate = ConfigSubDict()
+ # create list of output ports
+ portlist = self.getPortList()
for port in portlist:
for port in portlist:
+ descr = port
+ if descr == 'DVI' and hw_type in ('dm500hd', 'dm800se'):
+ descr = 'HDMI'
+ elif descr == 'DVI-PC' and hw_type in ('dm500hd', 'dm800se'):
+ descr = 'HDMI-PC'
+ lst.append((port, descr))
+
+ # create list of available modes
modes = self.getModeList(port)
if len(modes):
config.av.videomode[port] = ConfigSelection(choices = [mode for (mode, rates) in modes])
for (mode, rates) in modes:
config.av.videorate[mode] = ConfigSelection(choices = rates)
modes = self.getModeList(port)
if len(modes):
config.av.videomode[port] = ConfigSelection(choices = [mode for (mode, rates) in modes])
for (mode, rates) in modes:
config.av.videorate[mode] = ConfigSelection(choices = rates)
+ config.av.videoport = ConfigSelection(choices = lst)
def setConfiguredMode(self):
port = config.av.videoport.value
def setConfiguredMode(self):
port = config.av.videoport.value