X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/40fcf546f6168f51c070d4ded3c40a75c0780fe8..916eabe60eee4adb05387bbf1eaf1915ae5eac18:/src/common/gdicmn.cpp diff --git a/src/common/gdicmn.cpp b/src/common/gdicmn.cpp index f56aad7d4c..4129b48782 100644 --- a/src/common/gdicmn.cpp +++ b/src/common/gdicmn.cpp @@ -31,6 +31,7 @@ #include "wx/bitmap.h" #include "wx/colour.h" #include "wx/font.h" + #include "wx/math.h" #endif @@ -885,8 +886,8 @@ wxSize wxGetDisplayPPI() const wxSize pixels = wxGetDisplaySize(); const wxSize mm = wxGetDisplaySizeMM(); - return wxSize((pixels.x * 25.4) / mm.x, - (pixels.y * 25.4) / mm.y); + return wxSize((int)((pixels.x * inches2mm) / mm.x), + (int)((pixels.y * inches2mm) / mm.y)); } wxResourceCache::~wxResourceCache ()