mirror of
https://github.com/libretro/RetroArch
synced 2025-02-07 03:40:24 +00:00
(Emscripten) Refactor platform_emscripten.c - ToadKing - test
if this still works
This commit is contained in:
parent
87a21b2e13
commit
cd89a37682
@ -65,7 +65,7 @@
|
||||
|
||||
#endif
|
||||
|
||||
#if !defined(__APPLE__)
|
||||
#if !defined(__APPLE__) && !defined(EMSCRIPTEN)
|
||||
#define HAVE_MAIN_LOOP
|
||||
#endif
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user