author | kergoth <kergoth> | 2003-01-26 03:28:56 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2003-01-26 03:28:56 (UTC) |
commit | 7efc361470c6c91eb06ae7e800bb64aa645f6f73 (patch) (side-by-side diff) | |
tree | afe4a0d664c4e59ae43345f2a6c3431da9dcb809 /core/launcher/main.cpp | |
parent | 7d889b3840f2d07b2eb2d9ebb3df17d0a4ea686d (diff) | |
download | opie-7efc361470c6c91eb06ae7e800bb64aa645f6f73.zip opie-7efc361470c6c91eb06ae7e800bb64aa645f6f73.tar.gz opie-7efc361470c6c91eb06ae7e800bb64aa645f6f73.tar.bz2 |
mkipks
-rw-r--r-- | core/launcher/main.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp index 49b41d6..1e5eb46 100644 --- a/core/launcher/main.cpp +++ b/core/launcher/main.cpp @@ -66,11 +66,14 @@ void initEnvironment() QString lang = config.readEntry( "Language", getenv("LANG") ); if ( !lang.isNull() ) setenv( "LANG", lang, 1 ); + } int initApplication( int argc, char ** argv ) { + struct ODevice *odev = ODevice::inst(); + initEnvironment(); #if !defined(QT_QWS_CASSIOPEIA) && !defined(QT_QWS_IPAQ) && !defined(QT_QWS_EBX) @@ -81,7 +84,20 @@ int initApplication( int argc, char ** argv ) QWSServer::setDesktopBackground( QImage() ); DesktopApplication a( argc, argv, QApplication::GuiServer ); - ODevice::inst ( )-> setSoftSuspend ( true ); + int rot; + switch ( odev-> rotation( ) ) { + case None: + rot = 0; + case Rot90: + rot = 90; + case Rot180: + rot = 180; + case Rot270: + rot = 270; + } + a.setDefaultRotation( rot ); + + odev-> setSoftSuspend ( true ); { // init backlight QCopEnvelope e("QPE/System", "setBacklight(int)" ); @@ -124,7 +140,7 @@ int initApplication( int argc, char ** argv ) delete d; - ODevice::inst ( )-> setSoftSuspend ( false ); + odev-> setSoftSuspend ( false ); return rv; } |