MCPcopy Create free account
hub / github.com/crownengine/crown / main

Function main

src/device/main_html5.cpp:861–889  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

859} // namespace crown
860
861int main(int argc, char **argv)
862{
863 using namespace crown;
864
865#if CROWN_BUILD_UNIT_TESTS
866 CommandLine cl(argc, (const char **)argv);
867 if (cl.has_option("run-unit-tests")) {
868 return main_unit_tests();
869 }
870#endif
871
872 InitGlobals m;
873 CE_UNUSED(m);
874
875 DeviceOptions opts(default_allocator(), argc, (const char **)argv);
876 bool quit = false;
877 int ec = opts.parse(&quit);
878
879 if (quit)
880 return ec;
881
882 if (ec == EXIT_SUCCESS) {
883 s_emscripten_device = CE_NEW(default_allocator(), EmscriptenDevice)(default_allocator());
884 ec = s_emscripten_device->run(&opts);
885 CE_DELETE(default_allocator(), s_emscripten_device);
886 }
887
888 return ec;
889}
890
891#endif // if CROWN_PLATFORM_LINUX

Callers

nothing calls this directly

Calls 4

main_unit_testsFunction · 0.85
has_optionMethod · 0.80
parseMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected