From a7a13be656f44d4ab045e9a30cfa462f9d0d853e Mon Sep 17 00:00:00 2001 From: assiduous Date: Sat, 1 Jun 2024 14:49:49 -0700 Subject: [PATCH] FileSystem: added FILE_DIALOG_SUPPORTED macros --- Platforms/Apple/interface/AppleFileSystem.hpp | 6 +++++- Platforms/Apple/src/AppleFileSystem.mm | 2 +- Platforms/Win32/interface/Win32FileSystem.hpp | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Platforms/Apple/interface/AppleFileSystem.hpp b/Platforms/Apple/interface/AppleFileSystem.hpp index 6b848f709..11420c580 100644 --- a/Platforms/Apple/interface/AppleFileSystem.hpp +++ b/Platforms/Apple/interface/AppleFileSystem.hpp @@ -35,6 +35,10 @@ #include "../../Basic/interface/StandardFile.hpp" #include "../../Linux/interface/LinuxFileSystem.hpp" +#if PLATFORM_MACOS +# define FILE_DIALOG_SUPPORTED 1 +#endif + namespace Diligent { @@ -49,7 +53,7 @@ struct AppleFileSystem : public LinuxFileSystem static std::string FindResource(const std::string& FilePath); -#if PLATFORM_MACOS +#if FILE_DIALOG_SUPPORTED static std::string FileDialog(const FileDialogAttribs& DialogAttribs); #endif diff --git a/Platforms/Apple/src/AppleFileSystem.mm b/Platforms/Apple/src/AppleFileSystem.mm index 3972fa2aa..0233b56d9 100644 --- a/Platforms/Apple/src/AppleFileSystem.mm +++ b/Platforms/Apple/src/AppleFileSystem.mm @@ -79,7 +79,7 @@ return resource_path; } -#if PLATFORM_MACOS +#if FILE_DIALOG_SUPPORTED std::string AppleFileSystem::FileDialog(const FileDialogAttribs& DialogAttribs) { __block std::string Path; diff --git a/Platforms/Win32/interface/Win32FileSystem.hpp b/Platforms/Win32/interface/Win32FileSystem.hpp index 4b9553ba1..5dcc461db 100644 --- a/Platforms/Win32/interface/Win32FileSystem.hpp +++ b/Platforms/Win32/interface/Win32FileSystem.hpp @@ -31,6 +31,8 @@ #include "../../Basic/interface/BasicFileSystem.hpp" #include "../../Basic/interface/StandardFile.hpp" +#define FILE_DIALOG_SUPPORTED 1 + namespace Diligent {