mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 07:59:42 +00:00
Fix emscripten sleep
This commit is contained in:
parent
e5c0ab17e4
commit
24b410476b
@ -205,6 +205,9 @@ for f in `ls -v *_${platform}.${EXT}`; do
|
||||
whole_archive=
|
||||
big_stack=
|
||||
|
||||
if [ $PLATFORM = "emscripten" ]; then
|
||||
async=1 #emscripten needs async to sleep
|
||||
fi
|
||||
if [ $name = "nxengine" ] ; then
|
||||
echo "Applying whole archive linking..."
|
||||
whole_archive="WHOLE_ARCHIVE_LINK=1"
|
||||
|
@ -39,6 +39,8 @@
|
||||
#include <psp2/kernel/threadmgr.h>
|
||||
#elif defined(_3DS)
|
||||
#include <3ds.h>
|
||||
#elif defined(EMSCRIPTEN)
|
||||
#include <emscripten/emscripten.h>
|
||||
#else
|
||||
#include <time.h>
|
||||
#endif
|
||||
@ -99,6 +101,8 @@ static int nanosleepDOS(const struct timespec *rqtp, struct timespec *rmtp)
|
||||
#define retro_sleep(msec) (usleep(1000 * (msec)))
|
||||
#elif defined(WIIU)
|
||||
#define retro_sleep(msec) (OSSleepTicks(ms_to_ticks((msec))))
|
||||
#elif defined(EMSCRIPTEN)
|
||||
#define retro_sleep(msec) (emscripten_sleep(msec))
|
||||
#else
|
||||
static INLINE void retro_sleep(unsigned msec)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user