add ability to dump all your official themes

icon and name get extracted from the dlc data
requires libctru from commit 5f13628dac75206f0c97d29a7427ce8284d910f1 or older (added the am commands necessary to find the dlc data)
Makefile changed to reflect the macro change in unreleased libctru
This commit is contained in:
LiquidFenrir
2021-12-21 23:58:03 +01:00
parent c5dc7448e4
commit 4e2bea53c1
9 changed files with 289 additions and 15 deletions

View File

@@ -401,8 +401,8 @@ int main(void)
{
if(key_l)
index = 0;
// else if(key_r) // uncomment when we use the right menu. we don't for now
// index = 2;
else if(key_r) // uncomment when we use the right menu. we don't for now
index = 2;
}
instructions = extra_instructions[index];
}
@@ -648,13 +648,6 @@ int main(void)
{
load_icons_first(current_list, false);
}
else if((kDown | kHeld) & KEY_DRIGHT)
{
draw_install(INSTALL_DUMPING_THEME);
Result res = dump_theme();
if (R_FAILED(res)) DEBUG("Dump theme result: %lx\n", res);
else load_lists(lists);
}
}
else if(key_l)
{
@@ -677,6 +670,23 @@ int main(void)
load_icons_first(current_list, false);
}
}
else if(key_r)
{
if(((kDown | kHeld)) & KEY_DUP)
{
draw_install(INSTALL_DUMPING_THEME);
Result res = dump_current_theme();
if (R_FAILED(res)) DEBUG("Dump theme result: %lx\n", res);
else load_lists(lists);
}
else if(((kDown | kHeld)) & KEY_DDOWN)
{
draw_install(INSTALL_DUMPING_ALL_THEMES);
Result res = dump_all_themes();
if (R_FAILED(res)) DEBUG("Dump all themes result: %lx\n", res);
else load_lists(lists);
}
}
}
continue;
}