Skip to content

Commit

Permalink
Merge pull request godotengine#89902 from timothyqiu/not-available
Browse files Browse the repository at this point in the history
Return `ERR_UNAVAILABLE` if native dialog is not supported
  • Loading branch information
akien-mga committed Mar 26, 2024
2 parents 3fa6ec7 + 7118fb9 commit 7d151c8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions servers/display_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -645,22 +645,22 @@ void DisplayServer::enable_for_stealing_focus(OS::ProcessID pid) {

Error DisplayServer::dialog_show(String p_title, String p_description, Vector<String> p_buttons, const Callable &p_callback) {
WARN_PRINT("Native dialogs not supported by this display server.");
return OK;
return ERR_UNAVAILABLE;
}

Error DisplayServer::dialog_input_text(String p_title, String p_description, String p_partial, const Callable &p_callback) {
WARN_PRINT("Native dialogs not supported by this display server.");
return OK;
return ERR_UNAVAILABLE;
}

Error DisplayServer::file_dialog_show(const String &p_title, const String &p_current_directory, const String &p_filename, bool p_show_hidden, FileDialogMode p_mode, const Vector<String> &p_filters, const Callable &p_callback) {
WARN_PRINT("Native dialogs not supported by this display server.");
return OK;
return ERR_UNAVAILABLE;
}

Error DisplayServer::file_dialog_with_options_show(const String &p_title, const String &p_current_directory, const String &p_root, const String &p_filename, bool p_show_hidden, FileDialogMode p_mode, const Vector<String> &p_filters, const TypedArray<Dictionary> &p_options, const Callable &p_callback) {
WARN_PRINT("Native dialogs not supported by this display server.");
return OK;
return ERR_UNAVAILABLE;
}

int DisplayServer::keyboard_get_layout_count() const {
Expand Down

0 comments on commit 7d151c8

Please sign in to comment.