MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / print_web_header

Function print_web_header

platform/web/web_main.cpp:109–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109void print_web_header() {
110 // Emscripten.
111 char *emscripten_version_char = godot_js_emscripten_get_version();
112 String emscripten_version = vformat("Emscripten %s", emscripten_version_char);
113 // `free()` is used here because it's not memory that was allocated by Godot.
114 free(emscripten_version_char);
115
116 // Build features.
117 String thread_support = OS::get_singleton()->has_feature("threads")
118 ? "multi-threaded"
119 : "single-threaded";
120 String extensions_support = OS::get_singleton()->has_feature("web_extensions")
121 ? "GDExtension support"
122 : "no GDExtension support";
123
124 Vector<String> build_configuration = { emscripten_version, thread_support, extensions_support };
125 print_line(vformat("Build configuration: %s.", String(", ").join(build_configuration)));
126}
127
128/// When calling main, it is assumed FS is setup and synced.
129extern EMSCRIPTEN_KEEPALIVE int godot_web_main(int argc, char *argv[]) {

Callers 1

godot_web_mainFunction · 0.85

Calls 5

vformatFunction · 0.85
print_lineFunction · 0.85
joinMethod · 0.80
StringClass · 0.50
has_featureMethod · 0.45

Tested by

no test coverage detected