summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index c54e18c..d68bfac 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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);
}
© All Rights Reserved