Skip to content

Commit

Permalink
FileSystem: added FILE_DIALOG_SUPPORTED macros
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMostDiligent committed Jun 1, 2024
1 parent 8a15197 commit a7a13be
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Platforms/Apple/interface/AppleFileSystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{

Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion Platforms/Apple/src/AppleFileSystem.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions Platforms/Win32/interface/Win32FileSystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
#include "../../Basic/interface/BasicFileSystem.hpp"
#include "../../Basic/interface/StandardFile.hpp"

#define FILE_DIALOG_SUPPORTED 1

namespace Diligent
{

Expand Down

0 comments on commit a7a13be

Please sign in to comment.