diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -14,6 +14,9 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#ifdef __EMSCRIPTEN__ +#include <emscripten.h> +#endif #include <play.h> extern const play_ops_t sars_ops; @@ -33,7 +36,11 @@ int main(int argc, char *argv[]) play = play_startup(argc, argv, 0, ops); +#ifdef __EMSCRIPTEN__ + emscripten_set_main_loop_arg((void(*)(void *))play_run_slice, play, -1, 1); +#else play_run(play); +#endif return play_shutdown(play); } |