From 35edf52692c9f5e68b07072dd79b857d16d79559 Mon Sep 17 00:00:00 2001 From: kergoth Date: Tue, 15 Apr 2003 03:09:04 +0000 Subject: Unconditionally override Rot value when using the Transformed driver. This 1) Ensures that we dont hose QWS_DISPLAY when using a driver other than transformed, and 2) should ensure that the default rotation isnt screwed up when 'restart'ing Opie, thereby closing bug #796. --- diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp index a6e2a9d..20a1ecd 100644 --- a/core/launcher/main.cpp +++ b/core/launcher/main.cpp @@ -72,14 +72,9 @@ void initEnvironment() setenv( "QWS_SIZE", "240x320", 0 ); #endif - /* - * Rotation: - * 1. use env var if set - * 2. use saved default if set - * 3. use physical orientation (currently fails due to ODevice - * using a QPixmap and therefore requiring a QApplication) - */ - if ( getenv("QWS_DISPLAY") == NULL ) { + QString env(getenv("QWS_DISPLAY")); + if (env.contains("Transformed")) { + // transformed driver default rotation is controlled by the hardware. Config config("qpe"); config.setGroup( "Rotation" ); if ( ( rot = config.readNumEntry( "Rot", -1 ) ) == -1 ) -- cgit v0.9.0.2