From a0f4674f0bc86199865315d88bfe647a297d1b0e Mon Sep 17 00:00:00 2001 From: Sacha Date: Wed, 20 Mar 2013 05:26:53 +1000 Subject: [PATCH] Use Qt to lock orientation instead of platform-specific code. --- base/QtMain.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/base/QtMain.cpp b/base/QtMain.cpp index 05d3f471ac..c103f02457 100644 --- a/base/QtMain.cpp +++ b/base/QtMain.cpp @@ -12,7 +12,7 @@ #include #ifdef __SYMBIAN32__ -#include +#include #endif #include "QtMain.h" @@ -41,7 +41,7 @@ float CalculateDPIScale() { // Sane default for Symbian, Blackberry and Meego #ifdef __SYMBIAN32__ - return 1.3f; + return 1.4f; #else return 1.2f; #endif @@ -54,8 +54,6 @@ int main(int argc, char *argv[]) #endif QApplication a(argc, argv); #ifdef __SYMBIAN32__ - // Lock orientation to landscape on Symbian - QT_TRAP_THROWING(dynamic_cast(CEikonEnv::Static()->AppUi())->SetOrientationL(CAknAppUi::EAppUiOrientationLandscape)); // Set RunFast hardware mode for VFPv2. Denormalised values are treated as 0. NaN used for all NaN situations. User::SetFloatingPointMode(EFpModeRunFast); #endif @@ -79,6 +77,7 @@ int main(int argc, char *argv[]) #if defined(USING_GLES2) MainUI w(dpi_scale); + w.setAttribute(Qt::WA_LockLandscapeOrientation); w.resize(pixel_xres, pixel_yres); w.showFullScreen(); #endif