X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/f50ea7e42b05996b75eba9ed4376c539c5fc00ae..93e5471ad948cc4504bb128f0b5fbb0a939fbcbf:/lib/driver/avswitch.cpp diff --git a/lib/driver/avswitch.cpp b/lib/driver/avswitch.cpp index 35df9388..199a7855 100644 --- a/lib/driver/avswitch.cpp +++ b/lib/driver/avswitch.cpp @@ -14,6 +14,7 @@ eAVSwitch::eAVSwitch() { ASSERT(!instance); instance = this; + m_video_mode = 0; } eAVSwitch::~eAVSwitch() @@ -103,11 +104,13 @@ void eAVSwitch::setAspectRatio(int ratio) 0-4:3 Letterbox 1-4:3 PanScan 2-16:9 - 3-16:9 forced + 3-16:9 forced ("panscan") + 4-16:10 Letterbox + 5-16:10 PanScan + 6-16:9 forced ("letterbox") */ - - char *aspect[] = {"4:3", "4:3", "any", "16:9"}; - char *policy[] = {"letterbox", "panscan", "bestfit", "panscan"}; + char *aspect[] = {"4:3", "4:3", "any", "16:9", "16:10", "16:10", "16:9", "16:9"}; + char *policy[] = {"letterbox", "panscan", "bestfit", "panscan", "letterbox", "panscan", "letterbox"}; int fd; if((fd = open("/proc/stb/video/aspect", O_WRONLY)) < 0) { @@ -132,6 +135,10 @@ void eAVSwitch::setVideomode(int mode) { char *pal="pal"; char *ntsc="ntsc"; + + if (mode == m_video_mode) + return; + int fd; if((fd = open("/proc/stb/video/videomode", O_WRONLY)) < 0) { @@ -147,6 +154,8 @@ void eAVSwitch::setVideomode(int mode) break; } close(fd); + + m_video_mode = mode; } void eAVSwitch::setWSS(int val) // 0 = auto, 1 = auto(4:3_off)