(Emscripten) Refactor platform_emscripten.c - ToadKing - test

if this still works
This commit is contained in:
twinaphex 2014-07-22 05:07:40 +02:00
parent 87a21b2e13
commit cd89a37682
2 changed files with 7 additions and 22 deletions

View File

@ -65,7 +65,7 @@
#endif
#if !defined(__APPLE__)
#if !defined(__APPLE__) && !defined(EMSCRIPTEN)
#define HAVE_MAIN_LOOP
#endif

View File

@ -27,32 +27,17 @@
static void emscripten_mainloop(void)
{
if (!main_entry_iterate(0, NULL, NULL))
return;
main_exit(NULL);
exit(0);
if (main_entry_iterate(0, NULL, NULL))
{
main_exit(NULL);
exit(0);
}
}
int main(int argc, char *argv[])
{
emscripten_set_canvas_size(800, 600);
rarch_main_clear_state();
rarch_init_msg_queue();
int init_ret;
if ((init_ret = rarch_main_init(argc, argv))) return init_ret;
#ifdef HAVE_MENU
g_extern.lifecycle_state |= 1ULL << MODE_GAME;
// If we started content directly from command line,
// push it to content history.
if (!g_extern.libretro_dummy)
menu_content_history_push_current();
#endif
rarch_main(argc, argv);
emscripten_set_main_loop(emscripten_mainloop, g_settings.video.vsync ? 0 : INT_MAX, 1);
return 0;