From e63bcf320263ae8caa771c58e436b9654ca99cad Mon Sep 17 00:00:00 2001 From: scawful Date: Thu, 25 Sep 2025 20:15:13 -0400 Subject: [PATCH] Remove deprecated macOS file type handling from FileDialogWrapper for cleaner code and improved compatibility. This change simplifies the file dialog implementation by eliminating legacy checks for older macOS versions. --- src/app/core/platform/file_dialog.mm | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/app/core/platform/file_dialog.mm b/src/app/core/platform/file_dialog.mm index 3986d845..772da428 100644 --- a/src/app/core/platform/file_dialog.mm +++ b/src/app/core/platform/file_dialog.mm @@ -75,18 +75,6 @@ std::string yaze::core::FileDialogWrapper::ShowOpenFileDialogBespoke() { [openPanel setCanChooseDirectories:NO]; [openPanel setAllowsMultipleSelection:NO]; - // Use modern allowedContentTypes for macOS 12.0+ compatibility - if (@available(macOS 12.0, *)) { - [openPanel setAllowedContentTypes:@[ - [UTType typeWithFilenameExtension:@"sfc"], - [UTType typeWithFilenameExtension:@"smc"], - [UTType typeWithFilenameExtension:@"yaze"] - ]]; - } else { - // Fallback for older macOS versions - [openPanel setAllowedFileTypes:@[ @"sfc", @"smc", @"yaze" ]]; - } - if ([openPanel runModal] == NSModalResponseOK) { NSURL* url = [[openPanel URLs] objectAtIndex:0]; NSString* path = [url path];