Diffstat (limited to 'libopie2/opiecore/device/odevice_yopy.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/device/odevice_yopy.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libopie2/opiecore/device/odevice_yopy.cpp b/libopie2/opiecore/device/odevice_yopy.cpp index 223aa76..a06d7ec 100644 --- a/libopie2/opiecore/device/odevice_yopy.cpp +++ b/libopie2/opiecore/device/odevice_yopy.cpp | |||
@@ -134,22 +134,24 @@ bool Yopy::setDisplayBrightness( int bright ) | |||
134 | { | 134 | { |
135 | int fd = ::open( "/proc/sys/pm/light", O_WRONLY ); | 135 | int fd = ::open( "/proc/sys/pm/light", O_WRONLY ); |
136 | if ( fd >= 0 ) | 136 | if ( fd >= 0 ) |
137 | { | 137 | { |
138 | if ( bright ) | 138 | if ( bright ) |
139 | ::write( fd, "1\n", 2 ); | 139 | ::write( fd, "1\n", 2 ); |
140 | else | 140 | else |
141 | ::write( fd, "0\n", 2 ); | 141 | ::write( fd, "0\n", 2 ); |
142 | ::close( fd ); | 142 | ::close( fd ); |
143 | return true; | 143 | return true; |
144 | } | 144 | } |
145 | } | 145 | } |
146 | #else | ||
147 | Q_UNUSED( bright ) | ||
146 | #endif | 148 | #endif |
147 | return false; | 149 | return false; |
148 | } | 150 | } |
149 | 151 | ||
150 | 152 | ||
151 | int Yopy::displayBrightnessResolution() const | 153 | int Yopy::displayBrightnessResolution() const |
152 | { | 154 | { |
153 | return 2; | 155 | return 2; |
154 | } | 156 | } |
155 | 157 | ||