X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/83d8eb470b87ee0f19a203d2af3b70b153a87554..608f8a111b6149267dc58ba87ea8de2edb550685:/src/mgl/utils.cpp?ds=inline diff --git a/src/mgl/utils.cpp b/src/mgl/utils.cpp index 981be51871..fd2e5c63c7 100644 --- a/src/mgl/utils.cpp +++ b/src/mgl/utils.cpp @@ -60,11 +60,11 @@ void wxDisplaySizeMM(int *width, int *height) wxASSERT_MSG( g_displayDC, wxT("You must call wxApp::SetDisplayMode before using this function") ); int xDPI, yDPI; - MGL_getDotsPerInch(&xDPI, &yDPI); - - if ( width ) + MGL_getDotsPerInch(&xDPI, &yDPI); + + if ( width ) *width = (int)((g_displayDC->sizex()+1) * 25.4 / xDPI); - if ( height ) + if ( height ) *height = (int)((g_displayDC->sizey()+1) * 25.4 / yDPI); } @@ -79,7 +79,7 @@ void wxClientDisplayRect(int *x, int *y, int *width, int *height) bool wxColourDisplay() { wxASSERT_MSG( g_displayDC, wxT("You must call wxApp::SetDisplayMode before using this function") ); - + return (wxDisplayDepth() > 1); }