1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-09 21:51:45 +00:00

Fusee: Actually write SD path in stratosphere_merge_inis

This commit is contained in:
Michael Scire 2018-04-11 22:10:02 -06:00
parent 7ddf5a922c
commit 375a0b3fa8
2 changed files with 5 additions and 0 deletions

View file

@ -20,6 +20,7 @@ struct va_format {
unsigned long long simple_strtoull(const char *cp, char **endp, unsigned int base); unsigned long long simple_strtoull(const char *cp, char **endp, unsigned int base);
int vsnprintf(char *buf, size_t size, const char *fmt, va_list args); int vsnprintf(char *buf, size_t size, const char *fmt, va_list args);
int snprintf(char *buf, size_t size, const char *fmt, ...);
int sscanf(const char *buf, const char *fmt, ...); int sscanf(const char *buf, const char *fmt, ...);
#endif /* VSPRINTF_H */ #endif /* VSPRINTF_H */

View file

@ -3,6 +3,7 @@
#include "stratosphere.h" #include "stratosphere.h"
#include "sd_utils.h" #include "sd_utils.h"
#include "lib/printk.h" #include "lib/printk.h"
#include "lib/vsprintf.h"
unsigned char g_stratosphere_ini1[PACKAGE2_SIZE_MAX]; unsigned char g_stratosphere_ini1[PACKAGE2_SIZE_MAX];
static bool g_initialized_stratosphere_ini1 = false; static bool g_initialized_stratosphere_ini1 = false;
@ -69,6 +70,9 @@ void stratosphere_merge_inis(void *dst, ini1_header_t **inis, unsigned int num_i
continue; continue;
} }
/* TODO: What folder should these be read out of? */
snprintf(sd_path, sizeof(sd_path), "atmosph\xe8re/titles/%016llx/%016llx.kip", current_kip->title_id, current_kip->title_id);
/* Try to load an override KIP from SD, if possible. */ /* Try to load an override KIP from SD, if possible. */
if (read_sd_file(current_dst_kip, remaining_size, sd_path)) { if (read_sd_file(current_dst_kip, remaining_size, sd_path)) {
kip1_header_t *sd_kip = (kip1_header_t *)(current_dst_kip); kip1_header_t *sd_kip = (kip1_header_t *)(current_dst_kip);