Browse Source

Properly set HTML5 DisplayServer init error value.

Checked in main.cpp, would cause the engine to not load.
Fabio Alessandrelli 5 years ago
parent
commit
757af6a69f
1 changed files with 2 additions and 0 deletions
  1. 2 0
      platform/javascript/display_server_javascript.cpp

+ 2 - 0
platform/javascript/display_server_javascript.cpp

@@ -829,6 +829,8 @@ DisplayServer *DisplayServerJavaScript::create_func(const String &p_rendering_dr
 }
 }
 
 
 DisplayServerJavaScript::DisplayServerJavaScript(const String &p_rendering_driver, WindowMode p_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error) {
 DisplayServerJavaScript::DisplayServerJavaScript(const String &p_rendering_driver, WindowMode p_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error) {
+	r_error = OK; // Always succeeds for now.
+
 	RasterizerDummy::make_current(); // TODO GLES2 in Godot 4.0... or webgpu?
 	RasterizerDummy::make_current(); // TODO GLES2 in Godot 4.0... or webgpu?
 #if 0
 #if 0
 	EmscriptenWebGLContextAttributes attributes;
 	EmscriptenWebGLContextAttributes attributes;