X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/914589c26ced86ffa672171ee476e1740538fbb8..8a3f08bc6f9d7d7ece178d98fe01ac3ef45e1509:/src/os2/utils.cpp?ds=sidebyside diff --git a/src/os2/utils.cpp b/src/os2/utils.cpp index ec490fca94..4ae4063779 100644 --- a/src/os2/utils.cpp +++ b/src/os2/utils.cpp @@ -26,8 +26,6 @@ #include #ifdef __EMX__ #include -#else -#include #endif #include "wx/log.h" @@ -40,11 +38,8 @@ #include #include -#define INCL_DOS -#define INCL_PM -#define INCL_GPI -#include #define PURE_32 + #ifndef __EMX__ #include #include @@ -236,7 +231,7 @@ void wxUsleep( unsigned long ulMilliseconds ) { - ::DosSleep(ulMilliseconds); + ::DosSleep(ulMilliseconds/1000l); } void wxSleep( @@ -760,6 +755,31 @@ void wxDisplaySize( *pHeight = (int)lHeight; } +void wxDisplaySizeMM( + int* pWidth +, int* pHeight +) +{ + HPS hpsScreen; + HDC hdcScreen; + + hpsScreen = ::WinGetScreenPS(HWND_DESKTOP); + hdcScreen = ::GpiQueryDevice(hpsScreen); + + if (pWidth) + ::DevQueryCaps( hdcScreen + ,CAPS_HORIZONTAL_RESOLUTION + ,1L + ,(PLONG)pWidth + ); + if (pHeight) + ::DevQueryCaps( hdcScreen + ,CAPS_VERTICAL_RESOLUTION + ,1L + ,(PLONG)pHeight + ); +} + bool wxDirExists( const wxString& rDir )