From a8e30185f29914c61c779207366364602a8ed975 Mon Sep 17 00:00:00 2001 From: Sacha Date: Tue, 29 Jan 2013 07:35:39 +1000 Subject: [PATCH] Small adjustments for Blackberry/Symbian --- base/BlackberryMain.cpp | 4 ++-- base/QtMain.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/base/BlackberryMain.cpp b/base/BlackberryMain.cpp index 6a90becc7c..1da1661e7f 100644 --- a/base/BlackberryMain.cpp +++ b/base/BlackberryMain.cpp @@ -368,8 +368,8 @@ int main(int argc, char *argv[]) { screen_get_display_property_iv(screen_disp, SCREEN_PROPERTY_PHYSICAL_SIZE, screen_phys_size); int screen_resolution[2]; screen_get_display_property_iv(screen_disp, SCREEN_PROPERTY_SIZE, screen_resolution); - double diagonal_pixels = sqrt(screen_resolution[0] * screen_resolution[0] + screen_resolution[1] * screen_resolution[1]); - double diagonal_inches = 0.0393700787 * sqrt(screen_phys_size[0] * screen_phys_size[0] + screen_phys_size[1] * screen_phys_size[1]); + double diagonal_pixels = sqrt((double)(screen_resolution[0] * screen_resolution[0] + screen_resolution[1] * screen_resolution[1])); + double diagonal_inches = 0.0393700787 * sqrt((double)(screen_phys_size[0] * screen_phys_size[0] + screen_phys_size[1] * screen_phys_size[1])); int dpi = (int)(diagonal_pixels / diagonal_inches + 0.5); #endif float dpi_scale = 213.6f / dpi; diff --git a/base/QtMain.cpp b/base/QtMain.cpp index 63b5748a08..dd9b29832b 100644 --- a/base/QtMain.cpp +++ b/base/QtMain.cpp @@ -46,7 +46,7 @@ float CalculateDPIScale() TSize sTwips = CEikonEnv::Static()->ScreenDevice()->SizeInTwips(); float dpi = sqrt((float)(pixel_xres*pixel_xres + pixel_yres*pixel_yres)) / (sqrt((float)(sTwips.iHeight*sTwips.iHeight + sTwips.iWidth*sTwips.iWidth)) / KTwipsPerInch); - return dpi / 170.0f; + return dpi / 160.0f; #else // Sane default for Blackberry and Meego return 1.2f;