Theme install now works, added fast reboot code
This commit is contained in:
@@ -8,6 +8,7 @@ FS_Archive ArchiveHomeExt;
|
|||||||
FS_Archive ArchiveThemeExt;
|
FS_Archive ArchiveThemeExt;
|
||||||
|
|
||||||
Result open_archives(void);
|
Result open_archives(void);
|
||||||
|
Result close_archives(void);
|
||||||
int get_number_entries(char*);
|
int get_number_entries(char*);
|
||||||
u64 file_to_buf(FS_Path path, FS_Archive archive, char** buf);
|
u64 file_to_buf(FS_Path path, FS_Archive archive, char** buf);
|
||||||
u32 zip_file_to_buf(char *file_name, u16 *zip_path, char **buf);
|
u32 zip_file_to_buf(char *file_name, u16 *zip_path, char **buf);
|
||||||
|
|||||||
14
source/fs.c
14
source/fs.c
@@ -57,6 +57,20 @@ Result open_archives(void)
|
|||||||
return 0;
|
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 get_number_entries(char *path)
|
||||||
{
|
{
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|||||||
@@ -50,7 +50,9 @@ int main(void)
|
|||||||
u32 kDown = hidKeysDown();
|
u32 kDown = hidKeysDown();
|
||||||
if (kDown & KEY_START)
|
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);
|
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
|
size = buf_to_file(body_size, "/BodyCache.bin", ArchiveThemeExt, body); // Write body data to file
|
||||||
free(body);
|
free(body);
|
||||||
|
|
||||||
@@ -72,8 +70,6 @@ Result single_install(theme theme_to_install)
|
|||||||
return MAKERESULT(RL_PERMANENT, RS_CANCELED, RM_APPLICATION, RD_TOO_LARGE);
|
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);
|
size = buf_to_file(music_size, "/BgmCache.bin", ArchiveThemeExt, music);
|
||||||
free(music);
|
free(music);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user