(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
|
#endif
|
||||||
|
|
||||||
#if !defined(__APPLE__)
|
#if !defined(__APPLE__) && !defined(EMSCRIPTEN)
|
||||||
#define HAVE_MAIN_LOOP
|
#define HAVE_MAIN_LOOP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -27,32 +27,17 @@
|
||||||
|
|
||||||
static void emscripten_mainloop(void)
|
static void emscripten_mainloop(void)
|
||||||
{
|
{
|
||||||
if (!main_entry_iterate(0, NULL, NULL))
|
if (main_entry_iterate(0, NULL, NULL))
|
||||||
return;
|
{
|
||||||
|
|
||||||
main_exit(NULL);
|
main_exit(NULL);
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
emscripten_set_canvas_size(800, 600);
|
emscripten_set_canvas_size(800, 600);
|
||||||
|
rarch_main(argc, argv);
|
||||||
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
|
|
||||||
|
|
||||||
emscripten_set_main_loop(emscripten_mainloop, g_settings.video.vsync ? 0 : INT_MAX, 1);
|
emscripten_set_main_loop(emscripten_mainloop, g_settings.video.vsync ? 0 : INT_MAX, 1);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue