fix chorus popSample read pointer drift; show welcome only on first open

This commit is contained in:
Armin 2026-09-14 02:42:22 +02:00
commit d3bf0804e1
3 changed files with 36 additions and 5 deletions

View file

@ -185,7 +185,14 @@ LcdPanel::LcdPanel (RMX19AudioProcessor& p)
presentImage = juce::Image (juce::Image::ARGB, gridW * presentScale, gridH * presentScale, false);
backdrop = juce::Image (juce::Image::ARGB, gridW * subsample, gridH * subsample, false);
buildBackdrop();
splashUntil = juce::Time::getMillisecondCounter() + 1500;
if (firstRunEver())
{
splashUntil = juce::Time::getMillisecondCounter() + 1500;
}
else
{
screen = Screen::Home;
}
lastMidi = proc.getLastMidiTime();
startTimerHz (22);
}
@ -195,6 +202,25 @@ LcdPanel::~LcdPanel()
stopTimer();
}
// The welcome splash plays only on the very first plugin open ever. A small
// flag file under the user's Application Support dir records that it was shown,
// so later instances start directly on the Home screen.
static juce::File welcomeFlagFile()
{
return juce::File::getSpecialLocation (juce::File::userApplicationDataDirectory)
.getChildFile ("RMX-19").getChildFile ("welcome.seen");
}
bool LcdPanel::firstRunEver()
{
auto flag = welcomeFlagFile();
if (flag.exists())
return false;
flag.getParentDirectory().createDirectory();
flag.replaceWithText ("seen");
return true;
}
void LcdPanel::timerCallback()
{
bool needsRedraw = (screen == Screen::Splash);