diff options
| author | ghost <andreas.monzner@multimedia-labs.de> | 2008-11-17 23:34:41 +0100 |
|---|---|---|
| committer | ghost <andreas.monzner@multimedia-labs.de> | 2008-11-17 23:34:41 +0100 |
| commit | 5aa89f34249397330995cc0ab1e080c1f567e174 (patch) | |
| tree | 18f02352d51552b714d70da9bd65053b32029d5e /lib/python/Components | |
| parent | 9ca172f45cc02fe5cb693e7d35aade7d2233d448 (diff) | |
| download | enigma2-5aa89f34249397330995cc0ab1e080c1f567e174.tar.gz enigma2-5aa89f34249397330995cc0ab1e080c1f567e174.zip | |
get rid of some floating point values
Diffstat (limited to 'lib/python/Components')
| -rw-r--r-- | lib/python/Components/AVSwitch.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/python/Components/AVSwitch.py b/lib/python/Components/AVSwitch.py index 19aca24d..00350cbb 100644 --- a/lib/python/Components/AVSwitch.py +++ b/lib/python/Components/AVSwitch.py @@ -30,26 +30,24 @@ class AVSwitch: def getOutputAspect(self): if valstr in ("4_3_letterbox", "4_3_panscan"): # 4:3 - return 1.333333333 + return (4,3) elif valstr == "16_9": # auto ... 4:3 or 16:9 try: aspect_str = open("/proc/stb/vmpeg/0/aspect", "r").read() if aspect_str == "1": # 4:3 - return 1.333333333 + return (4,3) except IOError: pass - return 1.777777778 elif valstr in ("16_9_always", "16_9_letterbox"): # 16:9 - return 1.777777778 + pass elif valstr in ("16_10_letterbox", "16_10_panscan"): # 16:10 - return 1.6 - print "unknown output aspect!" - return 1.0000 + return (16,10) + return (16,9) def getFramebufferScale(self): aspect = self.getOutputAspect() fb_size = getDesktop(0).size() - return aspect / ((1.0 * fb_size.width()) / fb_size.height()) + return (aspect[0] * fb_size.height(), aspect[1] * fb_size.width()) def getAspectRatioSetting(self): valstr = config.av.aspectratio.value |
