Index: src/OFThread.m ================================================================== --- src/OFThread.m +++ src/OFThread.m @@ -28,10 +28,16 @@ # include #endif #include "unistd_wrapper.h" #include "platform.h" + +#if defined(OF_MORPHOS) && !defined(OF_IXEMUL) +# define BOOL EXEC_BOOL +# include +# undef BOOL +#endif #ifdef OF_WII # define BOOL OGC_BOOL # define nanosleep ogc_nanosleep # include @@ -187,10 +193,15 @@ if (rqtp.tv_sec != floor(timeInterval)) @throw [OFOutOfRangeException exception]; nanosleep(&rqtp, NULL); +#elif defined(OF_MORPHOS) && !defined(OF_IXEMUL) + if (timeInterval * 50 > ULONG_MAX) + @throw [OFOutOfRangeException exception]; + + Delay(timeInterval * 50); #elif defined(OF_NINTENDO_DS) uint64_t counter; if (timeInterval > UINT64_MAX / 60) @throw [OFOutOfRangeException exception];