aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Plugins/SystemPlugins/Videomode
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2008-01-30 23:56:51 +0000
committerFelix Domke <tmbinc@elitedvb.net>2008-01-30 23:56:51 +0000
commit7e71f6aaac51880ff1292b4817c0bd883a6196a7 (patch)
treedd5ba2651342efdc3fb6627147eeb6dc7e5a0a71 /lib/python/Plugins/SystemPlugins/Videomode
parentd7026a3a9370970633dd938b3b5ab9b2dc0a297f (diff)
downloadenigma2-7e71f6aaac51880ff1292b4817c0bd883a6196a7.tar.gz
enigma2-7e71f6aaac51880ff1292b4817c0bd883a6196a7.zip
set video mode on bootup, set /etc/videomode for bootup script
Diffstat (limited to 'lib/python/Plugins/SystemPlugins/Videomode')
-rw-r--r--lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py22
1 files changed, 21 insertions, 1 deletions
diff --git a/lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py b/lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py
index 701daaf2..09698736 100644
--- a/lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py
+++ b/lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py
@@ -57,7 +57,6 @@ class VideoHardware:
self.last_modes_preferred = [ ]
self.on_hotplug = CList()
-
self.readAvailableModes()
self.createConfig()
@@ -127,6 +126,11 @@ class VideoHardware:
except IOError:
print "setting videomode failed."
+ try:
+ open("/etc/videomode", "w").write(mode_50) # use 50Hz mode (if available) for booting
+ except IOError:
+ print "writing initial videomode to /etc/videomode failed."
+
def isPortAvailable(self, port):
# fixme
return True
@@ -169,5 +173,21 @@ class VideoHardware:
for (mode, rates) in modes:
config.av.videorate[mode] = ConfigSelection(choices = rates)
+ def setConfiguredMode(self):
+ port = config.av.videoport.value
+ if port not in config.av.videomode:
+ print "current port not available, not setting videomode"
+ return
+
+ mode = config.av.videomode[port].value
+
+ if mode not in config.av.videorate:
+ print "current mode not available, not setting videomode"
+ return
+
+ rate = config.av.videorate[mode].value
+ self.setMode(port, mode, rate)
+
config.av.edid_override = ConfigYesNo(default = False)
video_hw = VideoHardware()
+video_hw.setConfiguredMode()