This commit is contained in:
jpirnay
2026-03-13 21:24:04 +01:00
83 changed files with 104973 additions and 120228 deletions
+1 -1
View File
@@ -231,7 +231,7 @@ void SleepActivity::renderCustomSleepScreen() const {
// Generate a random number between 1 and numFiles
auto randomFileIndex = random(numFiles);
// If we picked the same image as last time, reroll
while (numFiles > 1 && randomFileIndex == APP_STATE.lastSleepImage) {
while (numFiles > 1 && APP_STATE.lastSleepImage != UINT8_MAX && randomFileIndex == APP_STATE.lastSleepImage) {
randomFileIndex = random(numFiles);
}
APP_STATE.lastSleepImage = randomFileIndex;