summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/main.cpp2
-rw-r--r--modules/mono/csharp_script.cpp9
-rw-r--r--platform/javascript/os_javascript.cpp11
3 files changed, 11 insertions, 11 deletions
diff --git a/main/main.cpp b/main/main.cpp
index 4759e378e9..f6a8391447 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -1775,7 +1775,7 @@ bool Main::iteration() {
if (frame > 1000000) {
- if (GLOBAL_DEF("debug/settings/stdout/print_fps", OS::get_singleton()->is_stdout_verbose())) {
+ if (GLOBAL_DEF("debug/settings/stdout/print_fps", OS::get_singleton()->is_stdout_verbose()) && !editor) {
print_line("FPS: " + itos(frames));
};
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp
index aee2481366..5bf2a4df35 100644
--- a/modules/mono/csharp_script.cpp
+++ b/modules/mono/csharp_script.cpp
@@ -1133,10 +1133,13 @@ Variant CSharpInstance::call(const StringName &p_method, const Variant **p_args,
MonoObject *mono_object = get_mono_object();
- ERR_FAIL_NULL_V(mono_object, Variant());
+ if (!mono_object) {
+ r_error.error = Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL;
+ ERR_FAIL_V(Variant());
+ }
if (!script.is_valid())
- return Variant();
+ ERR_FAIL_V(Variant());
GDMonoClass *top = script->script_class;
@@ -1146,6 +1149,8 @@ Variant CSharpInstance::call(const StringName &p_method, const Variant **p_args,
if (method) {
MonoObject *return_value = method->invoke(mono_object, p_args);
+ r_error.error = Variant::CallError::CALL_OK;
+
if (return_value) {
return GDMonoMarshal::mono_object_to_variant(return_value);
} else {
diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp
index 3590c30579..e226ab6332 100644
--- a/platform/javascript/os_javascript.cpp
+++ b/platform/javascript/os_javascript.cpp
@@ -430,16 +430,11 @@ Error OS_JavaScript::initialize(const VideoMode &p_desired, int p_video_driver,
// can't fulfil fullscreen request due to browser security
video_mode.fullscreen = false;
/* clang-format off */
- bool resize_canvas_on_start = EM_ASM_INT_V(
- return Module.resizeCanvasOnStart;
- );
- /* clang-format on */
- if (resize_canvas_on_start) {
+ if (EM_ASM_INT_V({ return Module.resizeCanvasOnStart })) {
+ /* clang-format on */
set_window_size(Size2(video_mode.width, video_mode.height));
} else {
- Size2 canvas_size = get_window_size();
- video_mode.width = canvas_size.width;
- video_mode.height = canvas_size.height;
+ set_window_size(get_window_size());
}
char locale_ptr[16];