1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-12-22 18:32:05 +00:00

Fusee: Update INI1 size after patching

This commit is contained in:
Michael Scire 2018-04-11 22:32:45 -06:00
parent 375a0b3fa8
commit 75b29e777b
3 changed files with 5 additions and 3 deletions

View file

@ -219,7 +219,7 @@ void package2_patch_ini1(void) {
inis_to_merge[STRATOSPHERE_INI1_PACKAGE2] = (ini1_header_t *)g_package2_sections[PACKAGE2_SECTION_INI1];
/* Merge all of the INI1s. */
stratosphere_merge_inis(g_package2_sections[PACKAGE2_SECTION_INI1], inis_to_merge, STRATOSPHERE_INI1_MAX);
g_patched_package2_header->metadata.section_sizes[PACKAGE2_SECTION_INI1] = stratosphere_merge_inis(g_package2_sections[PACKAGE2_SECTION_INI1], inis_to_merge, STRATOSPHERE_INI1_MAX);
}
void package2_fixup_header_and_section_hashes(void) {

View file

@ -27,7 +27,7 @@ ini1_header_t *stratosphere_get_ini1(void) {
}
/* Merges some number of INI1s into a single INI1. It's assumed that the INIs are in order of preference. */
void stratosphere_merge_inis(void *dst, ini1_header_t **inis, unsigned int num_inis) {
size_t stratosphere_merge_inis(void *dst, ini1_header_t **inis, unsigned int num_inis) {
char sd_path[0x300] = {0};
/* Validate all ini headers. */
for (unsigned int i = 0; i < num_inis; i++) {
@ -102,4 +102,6 @@ void stratosphere_merge_inis(void *dst, ini1_header_t **inis, unsigned int num_i
/* Copy merged INI1 to destination. */
memcpy(dst, merged, merged->size);
return merged->size;
}

View file

@ -10,6 +10,6 @@
ini1_header_t *stratosphere_get_ini1(void);
void stratosphere_merge_inis(void *dst, ini1_header_t **inis, unsigned int num_inis);
size_t stratosphere_merge_inis(void *dst, ini1_header_t **inis, unsigned int num_inis);
#endif