From e667dc2d59016f032447943a8e4cdc6e915db0ab Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Wed, 17 Apr 2024 11:12:14 +0300 Subject: [PATCH] [macOS] Fix native file dialog with empty filter list. --- platform/macos/godot_open_save_delegate.mm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/macos/godot_open_save_delegate.mm b/platform/macos/godot_open_save_delegate.mm index 6b55b706292..6ffd9395455 100644 --- a/platform/macos/godot_open_save_delegate.mm +++ b/platform/macos/godot_open_save_delegate.mm @@ -177,14 +177,14 @@ if ([new_allowed_types count] > 0) { NSMutableArray *type_filters = [new_allowed_types objectAtIndex:0]; if (type_filters && [type_filters count] == 1 && [[type_filters objectAtIndex:0] isEqualToString:@"*"]) { - [p_panel setAllowedFileTypes:@[]]; + [p_panel setAllowedFileTypes:nil]; [p_panel setAllowsOtherFileTypes:true]; } else { [p_panel setAllowsOtherFileTypes:false]; [p_panel setAllowedFileTypes:type_filters]; } } else { - [p_panel setAllowedFileTypes:@[]]; + [p_panel setAllowedFileTypes:nil]; [p_panel setAllowsOtherFileTypes:true]; } } @@ -248,7 +248,7 @@ if (allowed_types && index < [allowed_types count]) { NSMutableArray *type_filters = [allowed_types objectAtIndex:index]; if (type_filters && [type_filters count] == 1 && [[type_filters objectAtIndex:0] isEqualToString:@"*"]) { - [dialog setAllowedFileTypes:@[]]; + [dialog setAllowedFileTypes:nil]; [dialog setAllowsOtherFileTypes:true]; } else { [dialog setAllowsOtherFileTypes:false]; @@ -256,7 +256,7 @@ } cur_index = index; } else { - [dialog setAllowedFileTypes:@[]]; + [dialog setAllowedFileTypes:nil]; [dialog setAllowsOtherFileTypes:true]; cur_index = -1; }