Skip to content

Commit 7d151c8

Browse files
committed
Merge pull request godotengine#89902 from timothyqiu/not-available
Return `ERR_UNAVAILABLE` if native dialog is not supported
2 parents 3fa6ec7 + 7118fb9 commit 7d151c8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

servers/display_server.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -645,22 +645,22 @@ void DisplayServer::enable_for_stealing_focus(OS::ProcessID pid) {
645645

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

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

656656
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) {
657657
WARN_PRINT("Native dialogs not supported by this display server.");
658-
return OK;
658+
return ERR_UNAVAILABLE;
659659
}
660660

661661
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) {
662662
WARN_PRINT("Native dialogs not supported by this display server.");
663-
return OK;
663+
return ERR_UNAVAILABLE;
664664
}
665665

666666
int DisplayServer::keyboard_get_layout_count() const {

0 commit comments

Comments
 (0)