summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp
index 013f804..21070bf 100644
--- a/libopie/odevice.cpp
+++ b/libopie/odevice.cpp
@@ -1093,25 +1093,25 @@ void Yopy::initButtons ( )
connect(sysch, SIGNAL(received(const QCString&,const QByteArray&)),
this, SLOT(systemMessage(const QCString&,const QByteArray&)));
}
bool Yopy::suspend()
{
/* Opie for Yopy does not implement its own power management at the
moment. The public version runs parallel to X, and relies on the
existing power management features. */
return false;
}
-bool Yopy::setDisplayBrightness(int bright)
+bool Yopy::setDisplayBrightness(int /*bright*/)
{
/* The code here works, but is disabled as the current version runs
parallel to X, and relies on the existing backlight demon. */
#if 0
if ( QFile::exists("/proc/sys/pm/light") ) {
int fd = ::open("/proc/sys/pm/light", O_WRONLY);
if (fd >= 0 ) {
if (bright)
::write(fd, "1\n", 2);
else
::write(fd, "0\n", 2);
::close(fd);
@@ -1659,25 +1659,24 @@ void Zaurus::init ( )
d-> m_modelstr = "Zaurus SL-C760";
} else if ( model == "SHARP Poodle" ) {
d-> m_model = Model_Zaurus_SLB600;
d-> m_modelstr = "Zaurus SL-B500 or SL-5600";
} else if ( model == "Sharp-Collie" || model == "Collie" ) {
d-> m_model = Model_Zaurus_SL5500;
d-> m_modelstr = "Zaurus SL-5500 or SL-5000d";
} else {
d-> m_model = Model_Zaurus_SL5500;
d-> m_modelstr = "Zaurus (Model unknown)";
}
- bool flipstate = false;
switch ( d-> m_model ) {
case Model_Zaurus_SLA300:
d-> m_rotation = Rot0;
break;
case Model_Zaurus_SLC7x0:
d-> m_rotation = rotation();
d-> m_direction = direction();
break;
case Model_Zaurus_SLB600:
case Model_Zaurus_SL5500:
case Model_Zaurus_SL5000:
default:
@@ -2358,25 +2357,25 @@ bool SIMpad::setLedState ( OLed l, OLedState st )
read from cs3
&& with SIMPAD_LED2_ON
write to cs3 */
m_leds [0] = st;
return true;
}
}
}
return false;
}
-bool SIMpad::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, bool autoRepeat )
+bool SIMpad::filter ( int /*unicode*/, int /*keycode*/, int /*modifiers*/, bool /*isPress*/, bool /*autoRepeat*/ )
{
//TODO
return false;
}
void SIMpad::timerEvent ( QTimerEvent * )
{
killTimer ( m_power_timer );
m_power_timer = 0;
QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, true, false );
QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, false, false );
}
@@ -2419,47 +2418,46 @@ void SIMpad::alarmSound ( )
#endif
}
bool SIMpad::suspend ( ) // Must override because SIMpad does NOT have apm
{
qDebug( "ODevice for SIMpad: suspend()" );
if ( !isQWS( ) ) // only qwsserver is allowed to suspend
return false;
bool res = false;
- struct timeval tvs, tvn;
+ struct timeval tvs;
::gettimeofday ( &tvs, 0 );
::sync ( ); // flush fs caches
res = ( ::system ( "cat /dev/fb/0 >/tmp/.buffer; echo > /proc/sys/pm/suspend; cat /tmp/.buffer >/dev/fb/0" ) == 0 ); //TODO make better :)
return res;
}
bool SIMpad::setSoftSuspend ( bool soft )
{
qDebug( "ODevice for SIMpad: UNHANDLED setSoftSuspend(%s)", soft? "on" : "off" );
return false;
}
bool SIMpad::setDisplayStatus ( bool on )
{
qDebug( "ODevice for SIMpad: setDisplayStatus(%s)", on? "on" : "off" );
bool res = false;
- int fd;
QString cmdline = QString().sprintf( "echo %s > /proc/cs3", on ? "0xd41a" : "0xd40a" ); //TODO make better :)
res = ( ::system( (const char*) cmdline ) == 0 );
return res;
}
bool SIMpad::setDisplayBrightness ( int bright )
{
qDebug( "ODevice for SIMpad: setDisplayBrightness( %d )", bright );
@@ -2772,24 +2770,25 @@ void Jornada::initButtons ( )
b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib-> fheldservice ), ib-> fheldaction ));
d-> m_buttons-> append ( b );
}
}
reloadButtonMapping ( );
QCopChannel *sysch = new QCopChannel ( "QPE/System", this );
connect ( sysch, SIGNAL( received(const QCString&,const QByteArray&)), this, SLOT( systemMessage(const QCString&,const QByteArray&)));
}
#endif
int Jornada::displayBrightnessResolution ( ) const
{
+ return 255;
}
bool Jornada::setDisplayBrightness ( int bright )
{
bool res = false;
int fd;
if ( bright > 255 )
bright = 255;
if ( bright < 0 )
bright = 0;