summaryrefslogtreecommitdiff
path: root/plugins/ZamSFZ/ZamSFZPlugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/ZamSFZ/ZamSFZPlugin.cpp')
-rw-r--r--plugins/ZamSFZ/ZamSFZPlugin.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/plugins/ZamSFZ/ZamSFZPlugin.cpp b/plugins/ZamSFZ/ZamSFZPlugin.cpp
index db28e28..1cd026c 100644
--- a/plugins/ZamSFZ/ZamSFZPlugin.cpp
+++ b/plugins/ZamSFZ/ZamSFZPlugin.cpp
@@ -115,14 +115,26 @@ void ZamSFZPlugin::setState(const char* key, const char* value)
String ZamSFZPlugin::getState(const char*) const
{
- return String("filepath");
+ char fullpath[1024];
+ if ((path.size() == 0) || (filename.size() == 0)) {
+ return String("");
+ } else {
+ snprintf(fullpath, 1024, "%s/%s", path.c_str(), filename.c_str());
+ return String(fullpath);
+ }
}
void ZamSFZPlugin::initState(unsigned int key, String& val, String& def)
{
+ char fullpath[1024];
if (key == 0) {
val = String("filepath");
- def = String("");
+ if ((path.size() == 0) || (filename.size() == 0)) {
+ def = String("");
+ } else {
+ snprintf(fullpath, 1024, "%s/%s", path.c_str(), filename.c_str());
+ def = String(fullpath);
+ }
}
}