Skip to content

Commit efd675b

Browse files
committed
Make sure DAW presets can be transferred from Windows to macOS/Linux
1 parent c5bcc60 commit efd675b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Source/PluginProcessor.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1355,6 +1355,11 @@ void PluginProcessor::setStateInformation(void const* data, int const sizeInByte
13551355

13561356
auto patchesDir = ProjectInfo::appDataDir.getChildFile("Patches");
13571357
path = path.replace("${PATCHES_DIR}", patchesDir.getFullPathName());
1358+
1359+
// In case we try to load a DAW preset saved from Windows on any other OS
1360+
#if !JUCE_WINDOWS
1361+
path = path.replaceCharacter('\\', '/');
1362+
#endif
13581363
newPatches.emplace_back(state, File(path));
13591364
}
13601365

@@ -1422,6 +1427,9 @@ void PluginProcessor::setStateInformation(void const* data, int const sizeInByte
14221427
auto patchesDir = ProjectInfo::appDataDir.getChildFile("Patches");
14231428
location = location.replace("${PATCHES_DIR}", patchesDir.getFullPathName());
14241429

1430+
#if !JUCE_WINDOWS
1431+
location = location.replaceCharacter('\\', '/');
1432+
#endif
14251433
openPatch(content, location, pluginMode, pluginModeScale, splitIndex);
14261434

14271435
}

0 commit comments

Comments
 (0)