summaryrefslogtreecommitdiff
path: root/core
authorkergoth <kergoth>2003-01-26 03:28:56 (UTC)
committer kergoth <kergoth>2003-01-26 03:28:56 (UTC)
commit7efc361470c6c91eb06ae7e800bb64aa645f6f73 (patch) (unidiff)
treeafe4a0d664c4e59ae43345f2a6c3431da9dcb809 /core
parent7d889b3840f2d07b2eb2d9ebb3df17d0a4ea686d (diff)
downloadopie-7efc361470c6c91eb06ae7e800bb64aa645f6f73.zip
opie-7efc361470c6c91eb06ae7e800bb64aa645f6f73.tar.gz
opie-7efc361470c6c91eb06ae7e800bb64aa645f6f73.tar.bz2
mkipks
Diffstat (limited to 'core') (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/main.cpp20
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()
66 QString lang = config.readEntry( "Language", getenv("LANG") ); 66 QString lang = config.readEntry( "Language", getenv("LANG") );
67 if ( !lang.isNull() ) 67 if ( !lang.isNull() )
68 setenv( "LANG", lang, 1 ); 68 setenv( "LANG", lang, 1 );
69
69} 70}
70 71
71 72
72int initApplication( int argc, char ** argv ) 73int initApplication( int argc, char ** argv )
73{ 74{
75 struct ODevice *odev = ODevice::inst();
76
74 initEnvironment(); 77 initEnvironment();
75 78
76#if !defined(QT_QWS_CASSIOPEIA) && !defined(QT_QWS_IPAQ) && !defined(QT_QWS_EBX) 79#if !defined(QT_QWS_CASSIOPEIA) && !defined(QT_QWS_IPAQ) && !defined(QT_QWS_EBX)
@@ -81,7 +84,20 @@ int initApplication( int argc, char ** argv )
81 QWSServer::setDesktopBackground( QImage() ); 84 QWSServer::setDesktopBackground( QImage() );
82 DesktopApplication a( argc, argv, QApplication::GuiServer ); 85 DesktopApplication a( argc, argv, QApplication::GuiServer );
83 86
84 ODevice::inst ( )-> setSoftSuspend ( true ); 87 int rot;
88 switch ( odev-> rotation( ) ) {
89 case None:
90 rot = 0;
91 case Rot90:
92 rot = 90;
93 case Rot180:
94 rot = 180;
95 case Rot270:
96 rot = 270;
97 }
98 a.setDefaultRotation( rot );
99
100 odev-> setSoftSuspend ( true );
85 101
86 { // init backlight 102 { // init backlight
87 QCopEnvelope e("QPE/System", "setBacklight(int)" ); 103 QCopEnvelope e("QPE/System", "setBacklight(int)" );
@@ -124,7 +140,7 @@ int initApplication( int argc, char ** argv )
124 140
125 delete d; 141 delete d;
126 142
127 ODevice::inst ( )-> setSoftSuspend ( false ); 143 odev-> setSoftSuspend ( false );
128 144
129 return rv; 145 return rv;
130} 146}