mirror of
https://github.com/Relintai/sfw.git
synced 2024-12-20 21:06:49 +01:00
22 lines
414 B
C++
22 lines
414 B
C++
#ifdef __EMSCRIPTEN__
|
|
#include <emscripten.h>
|
|
#endif // __EMSCRIPTEN__
|
|
|
|
#include "game_application.h"
|
|
|
|
int main(int argc, char **argv) {
|
|
Application *application = memnew(GameApplication());
|
|
|
|
#ifdef __EMSCRIPTEN__
|
|
emscripten_set_main_loop(&Application::main_loop_static, 0, 1);
|
|
#else
|
|
while (application->running) {
|
|
application->main_loop();
|
|
}
|
|
#endif // __EMSCRIPTEN__
|
|
|
|
memdelete(application);
|
|
|
|
return 0;
|
|
}
|