mirror of
https://github.com/CTCaer/hekate
synced 2024-12-22 11:21:23 +00:00
Split remove archive bit in two
1. Only switch folder and its subfolders/files 2. Everything in sd card
This commit is contained in:
parent
3e35d99a3b
commit
d4731bb540
1 changed files with 20 additions and 5 deletions
25
ipl/main.c
25
ipl/main.c
|
@ -1938,7 +1938,8 @@ int fix_attributes(char *path, u32 *total)
|
|||
return res;
|
||||
}
|
||||
|
||||
void fix_sd_attr(){
|
||||
void fix_sd_attr(u32 type)
|
||||
{
|
||||
gfx_clear_grey(&gfx_ctxt, 0x1B);
|
||||
gfx_con_setpos(&gfx_con, 0, 0);
|
||||
|
||||
|
@ -1947,9 +1948,19 @@ void fix_sd_attr(){
|
|||
u32 total = 0;
|
||||
if (sd_mount())
|
||||
{
|
||||
gfx_printf(&gfx_con, "Traversing all sd card files!\nThis may take some time, please wait...\n");
|
||||
buff[0] = '/';
|
||||
buff[1] = 0;
|
||||
switch (type)
|
||||
{
|
||||
case 0:
|
||||
gfx_printf(&gfx_con, "Traversing all switch folder files!\nThis may take some time, please wait...\n");
|
||||
memcpy(buff, "/switch\0", 8);
|
||||
break;
|
||||
case 1:
|
||||
default:
|
||||
gfx_printf(&gfx_con, "Traversing all sd card files!\nThis may take some time, please wait...\n");
|
||||
memcpy(buff, "/\0", 2);
|
||||
break;
|
||||
}
|
||||
|
||||
fix_attributes(buff, &total);
|
||||
gfx_printf(&gfx_con, "\n%kTotal archive bits cleared: %d!%k\n\nDone! Press any key...", 0xFF96FF00, total, 0xFFCCCCCC);
|
||||
sd_unmount();
|
||||
|
@ -1957,6 +1968,9 @@ void fix_sd_attr(){
|
|||
btn_wait();
|
||||
}
|
||||
|
||||
void fix_sd_switch_attr() { fix_sd_attr(0); }
|
||||
void fix_sd_all_attr() { fix_sd_attr(1); }
|
||||
|
||||
void print_fuel_gauge_info()
|
||||
{
|
||||
int value = 0;
|
||||
|
@ -2393,8 +2407,9 @@ ment_t ment_tools[] = {
|
|||
MDEF_CHGLINE(),
|
||||
MDEF_CAPTION("-------- Misc --------", 0xFF0AB9E6),
|
||||
MDEF_HANDLER("Dump package1", dump_package1),
|
||||
MDEF_HANDLER("Fix SD files attributes", fix_sd_attr),
|
||||
MDEF_HANDLER("Fix battery de-sync", fix_battery_desync),
|
||||
MDEF_HANDLER("Remove archive bit (switch folder)", fix_sd_switch_attr),
|
||||
MDEF_HANDLER("Remove archive bit (all sd files)", fix_sd_all_attr),
|
||||
//MDEF_HANDLER("Fix fuel gauge configuration", fix_fuel_gauge_configuration),
|
||||
//MDEF_HANDLER("Reset all battery cfg", reset_pmic_fuel_gauge_charger_config),
|
||||
MDEF_CHGLINE(),
|
||||
|
|
Loading…
Reference in a new issue