Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/emu/machine.c b/src/emu/machine.c
- index d70161c..1ebb609 100644
- --- a/src/emu/machine.c
- +++ b/src/emu/machine.c
- @@ -387,7 +387,7 @@ int running_machine::run(bool firstrun)
- #ifdef SDLMAME_EMSCRIPTEN
- //break out to our async javascript loop and halt
- - js_set_main_loop(this);
- + //js_set_main_loop(this);
- #endif
- manager().web()->serve();
- diff --git a/src/osd/modules/lib/osdlib_unix.c b/src/osd/modules/lib/osdlib_unix.c
- index 7fe3c37..0ce6653 100644
- --- a/src/osd/modules/lib/osdlib_unix.c
- +++ b/src/osd/modules/lib/osdlib_unix.c
- @@ -198,6 +198,10 @@ void osd_sleep(osd_ticks_t duration)
- {
- // take a couple of msecs off the top for good measure
- msec -= 2;
- +#ifdef SDLMAME_EMSCRIPTEN
- + emscripten_sleep(msec);
- +#else
- usleep(msec*1000);
- +#endif
- }
- }
- diff --git a/src/osd/sdl/video.c b/src/osd/sdl/video.c
- index a5e5669..fe207b7 100644
- --- a/src/osd/sdl/video.c
- +++ b/src/osd/sdl/video.c
- @@ -318,6 +318,12 @@ void sdl_osd_interface::update(bool skip_redraw)
- if ((machine().debug_flags & DEBUG_FLAG_OSD_ENABLED) != 0)
- debugger_update();
- +
- +#ifdef SDLMAME_EMSCRIPTEN
- + //must sleep from time to time even if we are unthrottled or running behind
- + //so that the browser does not hang
- + osd_sleep(3000);
- +#endif
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement