X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/50567b69d60faa5a3575a077bb4f98530813c80d..606b005fb2b535b34d1ca45d2d06ee86718e8b1c:/src/msw/utils.cpp diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index f5efb921f0..dea7aeb352 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -51,8 +51,6 @@ extern "C" { #include "wx/timer.h" -#include - #if !defined(__GNUWIN32__) && !defined(__WXWINE__) && !defined(__SALFORDC__) #include @@ -90,15 +88,11 @@ extern "C" { #endif #endif -#include -#include -#include #ifndef __WATCOMC__ #if !(defined(_MSC_VER) && (_MSC_VER > 800)) #include #endif #endif -#include //// BEGIN for console support: VC++ only #ifdef __VISUALC__ @@ -109,13 +103,7 @@ extern "C" { #include "wx/ioswrap.h" -#if wxUSE_IOSTREAMH -// N.B. BC++ doesn't have istream.h, ostream.h -# include -# include -#else -# include -#endif +#include "wx/ioswrap.h" /* Need to undef new if including crtdbg.h */ # ifdef new @@ -862,10 +850,12 @@ int wxGetOsVersion(int *majorVsn, int *minorVsn) #if wxUSE_GUI +#if wxUSE_TIMER + // Sleep for nSecs seconds. Attempt a Windows implementation using timers. static bool gs_inTimer = FALSE; -class wxSleepTimer: public wxTimer +class wxSleepTimer : public wxTimer { public: virtual void Notify() @@ -881,7 +871,7 @@ void wxUsleep(unsigned long milliseconds) { #ifdef __WIN32__ ::Sleep(milliseconds); -#else +#else // !Win32 if (gs_inTimer) return; @@ -895,7 +885,7 @@ void wxUsleep(unsigned long milliseconds) } delete wxTheSleepTimer; wxTheSleepTimer = NULL; -#endif +#endif // Win32/!Win32 } void wxSleep(int nSecs) @@ -921,6 +911,8 @@ void wxFlushEvents() // wxYield(); } +#endif // wxUSE_TIMER + #elif defined(__WIN32__) // wxUSE_GUI void wxUsleep(unsigned long milliseconds)