author | sandman <sandman> | 2002-11-01 18:09:18 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-11-01 18:09:18 (UTC) |
commit | 7b7b760ca3886d5b6562a88b5c2ef8e610b73eb8 (patch) (unidiff) | |
tree | 55cf704333cb124a4764822432078de3caa05037 /core | |
parent | 75909e820818cc792e42d9c68fd50d05151b311d (diff) | |
download | opie-7b7b760ca3886d5b6562a88b5c2ef8e610b73eb8.zip opie-7b7b760ca3886d5b6562a88b5c2ef8e610b73eb8.tar.gz opie-7b7b760ca3886d5b6562a88b5c2ef8e610b73eb8.tar.bz2 |
- light sensor data was not scaled (no effect for iPAQs though)
- light sensor can now switch off the lcd backlight
- setBacklight ( -3 / -2 ) doesn't switch off the sensor mode anymore
-rw-r--r-- | core/launcher/screensaver.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/core/launcher/screensaver.cpp b/core/launcher/screensaver.cpp index 088ed19..b9bb64c 100644 --- a/core/launcher/screensaver.cpp +++ b/core/launcher/screensaver.cpp | |||
@@ -136,3 +136,3 @@ void OpieScreenSaver::setIntervals ( int i1, int i2, int i3 ) | |||
136 | 136 | ||
137 | qDebug("screen saver intervals: %d %d %d", i1, i2, i3); | 137 | //qDebug("screen saver intervals: %d %d %d", i1, i2, i3); |
138 | 138 | ||
@@ -173,6 +173,6 @@ void OpieScreenSaver::setBacklight ( int bright ) | |||
173 | 173 | ||
174 | //qDebug ( "setBacklight: %d (ls: %d)", m_backlight_normal, m_use_light_sensor ? 1 : 0 ); | 174 | //qDebug ( "setBacklight: %d (norm: %d) (ls: %d)", bright, m_backlight_normal, m_use_light_sensor ? 1 : 0 ); |
175 | 175 | ||
176 | killTimers ( ); | 176 | killTimers ( ); |
177 | if ( m_use_light_sensor ) { | 177 | if (( bright < 0 ) && m_use_light_sensor ) { |
178 | QStringList sl = config. readListEntry ( "LightSensorData", ';' ); | 178 | QStringList sl = config. readListEntry ( "LightSensorData", ';' ); |
@@ -227,3 +227,3 @@ void OpieScreenSaver::timerEvent ( QTimerEvent * ) | |||
227 | { | 227 | { |
228 | int s = ODevice::inst ( )-> readLightSensor ( ); | 228 | int s = ODevice::inst ( )-> readLightSensor ( ) * 256 / ODevice::inst ( )-> lightSensorResolution ( ); |
229 | 229 | ||
@@ -241,4 +241,2 @@ void OpieScreenSaver::timerEvent ( QTimerEvent * ) | |||
241 | } | 241 | } |
242 | if ( !m_backlight_sensor ) | ||
243 | m_backlight_sensor = 1; | ||
244 | 242 | ||