diff options
Diffstat (limited to 'lib/driver')
| -rw-r--r-- | lib/driver/avswitch.cpp | 5 | ||||
| -rw-r--r-- | lib/driver/avswitch.h | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/driver/avswitch.cpp b/lib/driver/avswitch.cpp index 35df9388..8197acc7 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() @@ -132,6 +133,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) { diff --git a/lib/driver/avswitch.h b/lib/driver/avswitch.h index 9c26b1ad..d0221d50 100644 --- a/lib/driver/avswitch.h +++ b/lib/driver/avswitch.h @@ -4,11 +4,12 @@ class eAVSwitch { static eAVSwitch *instance; + int m_video_mode; #ifdef SWIG eAVSwitch(); ~eAVSwitch(); #endif -protected: +protected: public: #ifndef SWIG eAVSwitch(); |
