fixed theme extdata corruption when installing shuffle themes after

scanning a qr code
This commit is contained in:
Helloman892
2017-09-16 17:23:35 +01:00
parent 4fb10029bb
commit f99f744000
3 changed files with 8 additions and 2 deletions

View File

@@ -48,6 +48,7 @@ static const int THEMES_PER_SCREEN = 4;
bool homebrew;
bool splash_mode;
int shuffle_theme_count;
enum TextureID {
TEXTURE_FONT_RESERVED = 0, //used by pp2d for the font

View File

@@ -96,7 +96,7 @@ int main(void)
int selected_splash = 0;
int selected_theme = 0;
int previously_selected = 0;
int shuffle_theme_count = 0;
shuffle_theme_count = 0;
bool preview_mode = false;
while(aptMainLoop())
@@ -210,7 +210,11 @@ int main(void)
draw_theme_install(SINGLE_INSTALL);
single_install(*current_theme);
}
//these two are here just so I don't forget how to implement them - HM
//these are here just so I don't forget how to implement them - HM
//if (current_theme->in_shuffle) {
// shuffle_theme_count--;
// current_theme->in_shuffle = false;
//}
//del_theme(current_theme->path);
//get_themes(&themes_list, &theme_count);
}

View File

@@ -152,6 +152,7 @@ static void parse_smdh(Theme_s *theme, ssize_t textureID, u16 *dir_name)
Result get_themes(Theme_s **themes_list, int *theme_count)
{
shuffle_theme_count = 0;
Result res = 0;
Handle dir_handle;
res = FSUSER_OpenDirectory(&dir_handle, ArchiveSD, fsMakePath(PATH_ASCII, THEMES_PATH));