fixed theme extdata corruption when installing shuffle themes after
scanning a qr code
This commit is contained in:
@@ -48,6 +48,7 @@ static const int THEMES_PER_SCREEN = 4;
|
|||||||
|
|
||||||
bool homebrew;
|
bool homebrew;
|
||||||
bool splash_mode;
|
bool splash_mode;
|
||||||
|
int shuffle_theme_count;
|
||||||
|
|
||||||
enum TextureID {
|
enum TextureID {
|
||||||
TEXTURE_FONT_RESERVED = 0, //used by pp2d for the font
|
TEXTURE_FONT_RESERVED = 0, //used by pp2d for the font
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ int main(void)
|
|||||||
int selected_splash = 0;
|
int selected_splash = 0;
|
||||||
int selected_theme = 0;
|
int selected_theme = 0;
|
||||||
int previously_selected = 0;
|
int previously_selected = 0;
|
||||||
int shuffle_theme_count = 0;
|
shuffle_theme_count = 0;
|
||||||
bool preview_mode = false;
|
bool preview_mode = false;
|
||||||
|
|
||||||
while(aptMainLoop())
|
while(aptMainLoop())
|
||||||
@@ -210,7 +210,11 @@ int main(void)
|
|||||||
draw_theme_install(SINGLE_INSTALL);
|
draw_theme_install(SINGLE_INSTALL);
|
||||||
single_install(*current_theme);
|
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);
|
//del_theme(current_theme->path);
|
||||||
//get_themes(&themes_list, &theme_count);
|
//get_themes(&themes_list, &theme_count);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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)
|
Result get_themes(Theme_s **themes_list, int *theme_count)
|
||||||
{
|
{
|
||||||
|
shuffle_theme_count = 0;
|
||||||
Result res = 0;
|
Result res = 0;
|
||||||
Handle dir_handle;
|
Handle dir_handle;
|
||||||
res = FSUSER_OpenDirectory(&dir_handle, ArchiveSD, fsMakePath(PATH_ASCII, THEMES_PATH));
|
res = FSUSER_OpenDirectory(&dir_handle, ArchiveSD, fsMakePath(PATH_ASCII, THEMES_PATH));
|
||||||
|
|||||||
Reference in New Issue
Block a user