Could you add this to the end of the StandalonePluginHolder constructor:
loadLastFile();
}
void loadLastFile()
{
if (auto* instance = JUCEApplication::getInstance())
{
auto params = instance->getCommandLineParameterArray();
if (params.size() == 1)
{
File f (params[0]);
if (f.existsAsFile())
{
MemoryBlock data;
if (f.loadFileAsData (data))
processor->setStateInformation (data.getData(), (int) data.getSize());
}
}
else
{
File f (getLastFile());
if (f.existsAsFile())
{
MemoryBlock data;
if (f.loadFileAsData (data))
processor->setStateInformation (data.getData(), (int) data.getSize());
}
}
}
}