Browse Source

Check for custom resources folder first in DemoUtilities.h createAssetInputStream() method on Mac

tags/2021-05-28
ed 7 years ago
parent
commit
eed9fdffb0
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      examples/Assets/DemoUtilities.h

+ 6
- 0
examples/Assets/DemoUtilities.h View File

@@ -82,6 +82,12 @@ inline InputStream* createAssetInputStream (const char* resourcePath)
#if JUCE_IOS #if JUCE_IOS
auto assetsDir = File::getSpecialLocation (File::currentExecutableFile) auto assetsDir = File::getSpecialLocation (File::currentExecutableFile)
.getParentDirectory().getChildFile ("Assets"); .getParentDirectory().getChildFile ("Assets");
#elif JUCE_MAC
auto assetsDir = File::getSpecialLocation (File::currentExecutableFile)
.getParentDirectory().getParentDirectory().getChildFile ("Resources").getChildFile ("Assets");
if (! assetsDir.exists())
assetsDir = getExamplesDirectory().getChildFile ("Assets");
#else #else
auto assetsDir = getExamplesDirectory().getChildFile ("Assets"); auto assetsDir = getExamplesDirectory().getChildFile ("Assets");
#endif #endif


Loading…
Cancel
Save