You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
[Web] Add Web-build specific stdout header
This commit is contained in:
@@ -104,6 +104,24 @@ void main_loop_callback() {
|
||||
}
|
||||
}
|
||||
|
||||
void print_web_header() {
|
||||
// Emscripten.
|
||||
char *emscripten_version_char = godot_js_emscripten_get_version();
|
||||
String emscripten_version = vformat("Emscripten %s", emscripten_version_char);
|
||||
memfree(emscripten_version_char);
|
||||
|
||||
// Build features.
|
||||
String thread_support = OS::get_singleton()->has_feature("threads")
|
||||
? "multi-threaded"
|
||||
: "single-threaded";
|
||||
String extensions_support = OS::get_singleton()->has_feature("web_extensions")
|
||||
? "GDExtension support"
|
||||
: "no GDExtension support";
|
||||
|
||||
Vector<String> build_configuration = { emscripten_version, thread_support, extensions_support };
|
||||
print_line(vformat("Build configuration: %s.", String(", ").join(build_configuration)));
|
||||
}
|
||||
|
||||
/// When calling main, it is assumed FS is setup and synced.
|
||||
extern EMSCRIPTEN_KEEPALIVE int godot_web_main(int argc, char *argv[]) {
|
||||
os = new OS_Web();
|
||||
@@ -128,6 +146,8 @@ extern EMSCRIPTEN_KEEPALIVE int godot_web_main(int argc, char *argv[]) {
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
print_web_header();
|
||||
|
||||
main_started = true;
|
||||
|
||||
// Ease up compatibility.
|
||||
|
||||
Reference in New Issue
Block a user