Commit dd8453dd authored by natalie's avatar natalie 💜
Browse files

Invalidate shuffle cache upon SD card swap

parent 59b64cb0
......@@ -106,6 +106,7 @@ uint8_t Sdcard_Setup() {
void Sdcard_Invalidate() { //mark card offline and invalidate any cached stuff that depends on card contents
Sdcard_Online = false;
Ui_ShuffleAll_Invalidate();
}
void Sdcard_Destroy() {
......
......@@ -34,7 +34,7 @@ static lv_style_t fnstyle;
static lv_style_t titlestyle;
static IRAM_ATTR uint32_t lastdraw = 0;
static IRAM_ATTR lv_obj_t *preload;
static bool already = false;
static volatile bool already = false;
static char cntbuf[16] = "0 tracks";
static IRAM_ATTR uint32_t trackcount = 0;
static IRAM_ATTR uint32_t bufused = 0;
......@@ -89,6 +89,10 @@ static void dumppls() {
closedir(dir);
}
void Ui_ShuffleAll_Invalidate() {
already = false;
}
void Ui_ShuffleAll_Setup(lv_obj_t *uiscreen) {
if (!Queue_Shuffle) {
Queue_Shuffle = true;
......
......@@ -9,5 +9,6 @@ void Ui_ShuffleAll_Setup(lv_obj_t *uiscreen);
void Ui_ShuffleAll_Destroy();
void Ui_ShuffleAll_Key(KeyEvent_t event);
void Ui_ShuffleAll_Tick();
void Ui_ShuffleAll_Invalidate();
#endif
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment