From 910efbff03b588d2aba7ca99c1cc018669a5d492 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20J=2E=20Est=C3=A9banez?= Date: Tue, 23 Aug 2022 11:14:07 +0200 Subject: Avoid warnings about cursor shape change not supported --- scene/main/viewport.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'scene/main/viewport.cpp') diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index cc356e513c..764fc60bc1 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1875,7 +1875,9 @@ void Viewport::_gui_input_event(Ref p_event) { } } - DisplayServer::get_singleton()->cursor_set_shape(ds_cursor_shape); + if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_CURSOR_SHAPE)) { + DisplayServer::get_singleton()->cursor_set_shape(ds_cursor_shape); + } } Ref touch_event = p_event; @@ -2684,7 +2686,9 @@ bool Viewport::_sub_windows_forward_input(const Ref &p_event) { DisplayServer::CURSOR_FDIAGSIZE }; - DisplayServer::get_singleton()->cursor_set_shape(shapes[resize]); + if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_CURSOR_SHAPE)) { + DisplayServer::get_singleton()->cursor_set_shape(shapes[resize]); + } return true; // Reserved for showing the resize cursor. } -- cgit v1.2.3