[DisplayServer] Add separate feature flags for different native dialog types.

This commit is contained in:
bruvzg
2024-03-26 15:18:06 +02:00
parent 7d151c8381
commit dc01658ee9
11 changed files with 33 additions and 9 deletions

View File

@ -68,7 +68,7 @@ void FileDialog::popup(const Rect2i &p_rect) {
}
#endif
if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_NATIVE_DIALOG) && (use_native_dialog || OS::get_singleton()->is_sandboxed())) {
if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_NATIVE_DIALOG_FILE) && (use_native_dialog || OS::get_singleton()->is_sandboxed())) {
String root;
if (access == ACCESS_RESOURCES) {
root = ProjectSettings::get_singleton()->get_resource_path();
@ -91,7 +91,7 @@ void FileDialog::set_visible(bool p_visible) {
}
#endif
if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_NATIVE_DIALOG) && (use_native_dialog || OS::get_singleton()->is_sandboxed())) {
if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_NATIVE_DIALOG_FILE) && (use_native_dialog || OS::get_singleton()->is_sandboxed())) {
if (p_visible) {
String root;
if (access == ACCESS_RESOURCES) {