]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/utils.cpp
no more SetAppName/SetVendor in the config classes
[wxWidgets.git] / src / msw / utils.cpp
index 0f5ebc51abc8cb85d755685c2973cf9607efa4ca..3dc34fdc7e5556f4549575c754c3b6d2dbc6817b 100644 (file)
@@ -299,6 +299,27 @@ class wxSleepTimer: public wxTimer
 
 static wxTimer *wxTheSleepTimer = NULL;
 
+void wxUsleep(unsigned long milliseconds)
+{
+#ifdef __WIN32__
+    ::Sleep(milliseconds);
+#else
+  if (inTimer)
+    return;
+
+  wxTheSleepTimer = new wxSleepTimer;
+  inTimer = TRUE;
+  wxTheSleepTimer->Start(milliseconds);
+  while (inTimer)
+  {
+    if (wxTheApp->Pending())
+      wxTheApp->Dispatch();
+  }
+  delete wxTheSleepTimer;
+  wxTheSleepTimer = NULL;
+#endif
+}
+
 void wxSleep(int nSecs)
 {
 #if 0 // WIN32 hangs app
@@ -537,7 +558,6 @@ void wxEndBusyCursor()
     wxCHECK_RET( gs_wxBusyCursorCount > 0,
                  "no matching wxBeginBusyCursor() for wxEndBusyCursor()" );
 
-    gs_wxBusyCursorCount--;
     if ( --gs_wxBusyCursorCount == 0 )
     {
         ::SetCursor(gs_wxBusyCursorOld);