From f58823544101d54b935c866f6f2a2fa6a7e1c916 Mon Sep 17 00:00:00 2001 From: Anish Mishra Date: Sun, 29 Dec 2024 13:38:27 +0530 Subject: [PATCH] Warn if virtual_keyboard_get_height() is unsupported This PR updates the `DisplayServer::virtual_keyboard_get_height()` method to return 0 with a warning instead of throwing an error when the virtual keyboard is not supported. --- servers/display_server.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/servers/display_server.cpp b/servers/display_server.cpp index b31c4d6b1d..8471a88998 100644 --- a/servers/display_server.cpp +++ b/servers/display_server.cpp @@ -631,7 +631,8 @@ void DisplayServer::virtual_keyboard_hide() { // returns height of the currently shown keyboard (0 if keyboard is hidden) int DisplayServer::virtual_keyboard_get_height() const { - ERR_FAIL_V_MSG(0, "Virtual keyboard not supported by this display server."); + WARN_PRINT("Virtual keyboard not supported by this display server."); + return 0; } bool DisplayServer::has_hardware_keyboard() const {