Theme install now works, added fast reboot code
This commit is contained in:
14
source/fs.c
14
source/fs.c
@@ -57,6 +57,20 @@ Result open_archives(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
Result close_archives(void)
|
||||
{
|
||||
Result retValue;
|
||||
|
||||
retValue = FSUSER_CloseArchive(ArchiveSD);
|
||||
if(R_FAILED(retValue)) return retValue;
|
||||
retValue = FSUSER_CloseArchive(ArchiveHomeExt);
|
||||
if(R_FAILED(retValue)) return retValue;
|
||||
retValue = FSUSER_CloseArchive(ArchiveThemeExt);
|
||||
if(R_FAILED(retValue)) return retValue;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int get_number_entries(char *path)
|
||||
{
|
||||
int count = 0;
|
||||
|
||||
@@ -50,7 +50,9 @@ int main(void)
|
||||
u32 kDown = hidKeysDown();
|
||||
if (kDown & KEY_START)
|
||||
{
|
||||
break;
|
||||
close_archives();
|
||||
PTMSYSM_ShutdownAsync(0);
|
||||
ptmSysmExit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -45,8 +45,6 @@ Result single_install(theme theme_to_install)
|
||||
return MAKERESULT(RL_PERMANENT, RS_CANCELED, RM_APPLICATION, RD_NOT_FOUND);
|
||||
}
|
||||
|
||||
remake_file("/BodyCache.bin", ArchiveThemeExt, 0x150000);
|
||||
|
||||
size = buf_to_file(body_size, "/BodyCache.bin", ArchiveThemeExt, body); // Write body data to file
|
||||
free(body);
|
||||
|
||||
@@ -72,8 +70,6 @@ Result single_install(theme theme_to_install)
|
||||
return MAKERESULT(RL_PERMANENT, RS_CANCELED, RM_APPLICATION, RD_TOO_LARGE);
|
||||
}
|
||||
|
||||
remake_file("/BgmCache.bin", ArchiveThemeExt, 3371008);
|
||||
|
||||
size = buf_to_file(music_size, "/BgmCache.bin", ArchiveThemeExt, music);
|
||||
free(music);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user