Mingw has not sleep(), uses WinAPI Sleep().

This commit is contained in:
Mark Liversedge
2011-12-12 22:33:45 +00:00
parent b206b8af50
commit 9a58bcee6c
2 changed files with 8 additions and 0 deletions

View File

@@ -294,7 +294,11 @@ struct usb_dev_handle* LibUsb::OpenFortius()
// Given this is only required /the first time/ the Fortius
// is connected, it can't be that bad?
if (programmed == true) {
#ifdef WIN32
Sleep(3000); // windows sleep is in milliseconds
#else
sleep(3); // do not be tempted to reduce this, it really does take that long!
#endif
usb_find_busses();
usb_find_devices();
}

View File

@@ -22,6 +22,10 @@
#if defined GC_HAVE_LIBUSB
#ifdef WIN32
#include <windows.h>
#endif
#include <usb.h> // for the constants etc
// EZ-USB firmware loader for Fortius