diff --git a/include/title.h b/include/title.h index 3039c2e..0cd28d9 100644 --- a/include/title.h +++ b/include/title.h @@ -74,6 +74,6 @@ size_t getTextureId(int i); void loadFilter(void); void loadTitles(void); -void refreshDirectories(size_t index); +void refreshDirectories(u64 id); #endif \ No newline at end of file diff --git a/source/fsstream.cpp b/source/fsstream.cpp index 7bfe351..f218272 100644 --- a/source/fsstream.cpp +++ b/source/fsstream.cpp @@ -289,7 +289,7 @@ void backup(size_t index) return; } - refreshDirectories(index); + refreshDirectories(title.getId()); } else { @@ -378,7 +378,7 @@ void backup(size_t index) delete[] saveFile; stream.close(); - refreshDirectories(index); + refreshDirectories(title.getId()); } createInfo("Success!", "Progress correctly saved to disk."); diff --git a/source/title.cpp b/source/title.cpp index 55f484c..a8cf062 100644 --- a/source/title.cpp +++ b/source/title.cpp @@ -442,15 +442,27 @@ static void loadTextureIcon(smdh_s *smdh, size_t i) { free(image); } -void refreshDirectories(size_t i) +void refreshDirectories(u64 id) { const Mode_t mode = getMode(); if (mode == MODE_SAVE) { - titleSaves.at(i).refreshDirectories(); + for (size_t i = 0; i < titleSaves.size(); i++) + { + if (titleSaves.at(i).getId() == id) + { + titleSaves.at(i).refreshDirectories(); + } + } } else { - titleExtdatas.at(i).refreshDirectories(); + for (size_t i = 0; i < titleExtdatas.size(); i++) + { + if (titleExtdatas.at(i).getId() == id) + { + titleExtdatas.at(i).refreshDirectories(); + } + } } } \ No newline at end of file