commit 55fb32b2e3a22ea37ad024968dd83d71545d1877
parent b3da4457408d389ab39aab404fa9f1febcc4814f
Author: Adam M <aemalone@gmail.com>
Date: Sat, 16 Oct 2021 09:34:14 -0500
use asset::user rather than string::directory to get path of CustomBlank image file. Not sure if this works?
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/ComputerscareBlank.cpp b/src/ComputerscareBlank.cpp
@@ -333,7 +333,7 @@ struct ComputerscareBlank : ComputerscareMenuParamModule {
yOffset = 0;
}
void loadImageDialog(int index = 0) {
- std::string dir = this->paths[index].empty() ? asset::user("../") : rack::string::directory(this->paths[index]);
+ std::string dir = this->paths[index].empty() ? asset::user("../") : asset::user(this->paths[index]);
char* pathC = osdialog_file(OSDIALOG_OPEN, dir.c_str(), NULL, NULL);
if (!pathC) {
return;
@@ -346,7 +346,7 @@ struct ComputerscareBlank : ComputerscareMenuParamModule {
jsonFlag = false;
}
void setContainingDirectory(int index = 0) {
- std::string dir = rack::string::directory(paths[index]);
+ std::string dir = asset::user(paths[index]);
std::string currentImageFullpath;
parentDirectory = dir;
int imageIndex = 0;;