summaryrefslogtreecommitdiff
path: root/platform/javascript/display_server_javascript.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-06-03 22:00:15 +0200
committerGitHub <noreply@github.com>2021-06-03 22:00:15 +0200
commitea2a0b54554c09999d74212925322e8c7b2437e0 (patch)
tree94529540eb7696c2dcca2a2545e2f0d5ee6ead35 /platform/javascript/display_server_javascript.cpp
parent4e4f96f9896eef06afb5b22ae6019bd85d24a354 (diff)
parent98aa3b669ee3425f40d6c3f3f96217bddf7b7137 (diff)
Merge pull request #43450 from aaronfranke/mouse-mode-bitwise
Add MOUSE_MODE_CONFINED_HIDDEN to MouseMode enum
Diffstat (limited to 'platform/javascript/display_server_javascript.cpp')
-rw-r--r--platform/javascript/display_server_javascript.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/platform/javascript/display_server_javascript.cpp b/platform/javascript/display_server_javascript.cpp
index cce1f8dca7..1cc05a2e19 100644
--- a/platform/javascript/display_server_javascript.cpp
+++ b/platform/javascript/display_server_javascript.cpp
@@ -407,9 +407,10 @@ void DisplayServerJavaScript::cursor_set_custom_image(const RES &p_cursor, Curso
// Mouse mode
void DisplayServerJavaScript::mouse_set_mode(MouseMode p_mode) {
- ERR_FAIL_COND_MSG(p_mode == MOUSE_MODE_CONFINED, "MOUSE_MODE_CONFINED is not supported for the HTML5 platform.");
- if (p_mode == mouse_get_mode())
+ ERR_FAIL_COND_MSG(p_mode == MOUSE_MODE_CONFINED || p_mode == MOUSE_MODE_CONFINED_HIDDEN, "MOUSE_MODE_CONFINED is not supported for the HTML5 platform.");
+ if (p_mode == mouse_get_mode()) {
return;
+ }
if (p_mode == MOUSE_MODE_VISIBLE) {
godot_js_display_cursor_set_visible(1);