summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/screensaver.cpp12
1 files changed, 5 insertions, 7 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,6 +241,4 @@ void OpieScreenSaver::timerEvent ( QTimerEvent * )
241 } 241 }
242 if ( !m_backlight_sensor )
243 m_backlight_sensor = 1;
244 242
245 // qDebug ( "f(%d) = %d [%d - %d] -> [%d - %d] / %d", s, m_backlight_sensor, m_sensordata [LS_SensorMin], m_sensordata [LS_SensorMax], m_sensordata [LS_LightMin], m_sensordata [LS_LightMax], m_sensordata [LS_Steps] ); 243 //qDebug ( "f(%d) = %d [%d - %d] -> [%d - %d] / %d", s, m_backlight_sensor, m_sensordata [LS_SensorMin], m_sensordata [LS_SensorMax], m_sensordata [LS_LightMin], m_sensordata [LS_LightMax], m_sensordata [LS_Steps] );
246 244