You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
use console.warn instead of Module.printErr: emscripten no longer exports printErr by default, and instead err() should be used in code seen by the optimizer; however, as Godot only runs on the Web (and not in node.js or elsewhere), using console.warn directly is good enough, and will work in all versions if emscripten
This commit is contained in:
@@ -82,7 +82,7 @@ var GodotHTTPRequest = {
|
||||
|
||||
godot_xhr_send_string: function(xhrId, strPtr) {
|
||||
if (!strPtr) {
|
||||
Module.printErr("Failed to send string per XHR: null pointer");
|
||||
console.warn("Failed to send string per XHR: null pointer");
|
||||
return;
|
||||
}
|
||||
GodotHTTPRequest.requests[xhrId].send(UTF8ToString(strPtr));
|
||||
@@ -90,11 +90,11 @@ var GodotHTTPRequest = {
|
||||
|
||||
godot_xhr_send_data: function(xhrId, ptr, len) {
|
||||
if (!ptr) {
|
||||
Module.printErr("Failed to send data per XHR: null pointer");
|
||||
console.warn("Failed to send data per XHR: null pointer");
|
||||
return;
|
||||
}
|
||||
if (len < 0) {
|
||||
Module.printErr("Failed to send data per XHR: buffer length less than 0");
|
||||
console.warn("Failed to send data per XHR: buffer length less than 0");
|
||||
return;
|
||||
}
|
||||
GodotHTTPRequest.requests[xhrId].send(HEAPU8.subarray(ptr, ptr + len));
|
||||
|
||||
Reference in New Issue
Block a user