@@ -33,10 +33,18 @@ #endif #if defined(OF_HAVE_THREADS) && defined(__HAIKU__) # include #endif + +#ifdef __wii__ +# define BOOL OGC_BOOL +# define asm __asm__ +# include +# undef BOOL +# undef asm +#endif #import "OFThread.h" #import "OFThread+Private.h" #import "OFRunLoop.h" #import "OFList.h" @@ -191,11 +199,16 @@ rqtp.tv_nsec = lrint((timeInterval - rqtp.tv_sec) * 1000000000); if (rqtp.tv_sec != floor(timeInterval)) @throw [OFOutOfRangeException exception]; +# ifndef __wii__ nanosleep(&rqtp, NULL); +# else + /* Wii has an incompatible nanosleep */ + nanosleep(&rqtp); +# endif #else if (timeInterval > UINT_MAX) @throw [OFOutOfRangeException exception]; sleep((unsigned int)timeInterval);