fss0: Support experimental content
Use key `fss0experimental=1` in a boot entry with `fss0=` defined to enable experimental content. (Older versions of hekate will just skip any experimental content.)
This commit is contained in:
@@ -44,6 +44,8 @@ extern bool is_ipl_updated(void *buf, char *path, bool force);
|
||||
#define CNT_TYPE_BMP 7
|
||||
#define CNT_TYPE_EMC 8
|
||||
|
||||
#define CNT_FLAG0_EXPERIMENTAL (1 << 0)
|
||||
|
||||
typedef struct _fss_t
|
||||
{
|
||||
u32 magic;
|
||||
@@ -60,7 +62,10 @@ typedef struct _fss_content_t
|
||||
{
|
||||
u32 offset;
|
||||
u32 size;
|
||||
u32 type;
|
||||
u8 type;
|
||||
u8 flags0;
|
||||
u8 flags1;
|
||||
u8 flags2;
|
||||
u32 rsvd1;
|
||||
char name[0x10];
|
||||
} fss_content_t;
|
||||
@@ -142,6 +147,9 @@ int parse_fss(launch_ctxt_t *ctxt, const char *path, fss0_sept_t *sept_ctxt)
|
||||
if ((curr_fss_cnt[i].offset + curr_fss_cnt[i].size) > fss_meta->size)
|
||||
continue;
|
||||
|
||||
if ((curr_fss_cnt[i].flags0 & CNT_FLAG0_EXPERIMENTAL) && !ctxt->fss0_enable_experimental)
|
||||
continue;
|
||||
|
||||
// Load content to launch context.
|
||||
if (!sept_ctxt)
|
||||
{
|
||||
|
||||
@@ -67,6 +67,7 @@ typedef struct _launch_ctxt_t
|
||||
bool atmosphere;
|
||||
bool exo_no_user_exceptions;
|
||||
bool exo_user_pmu;
|
||||
bool fss0_enable_experimental;
|
||||
bool emuMMC;
|
||||
|
||||
ini_sec_t *cfg;
|
||||
|
||||
@@ -213,6 +213,15 @@ static int _config_exo_user_pmu_access(launch_ctxt_t *ctxt, const char *value)
|
||||
|
||||
static int _config_fss(launch_ctxt_t *ctxt, const char *value)
|
||||
{
|
||||
LIST_FOREACH_ENTRY(ini_kv_t, kv, &ctxt->cfg->kvs, link)
|
||||
{
|
||||
if (!strcmp("fss0experimental", kv->key))
|
||||
{
|
||||
ctxt->fss0_enable_experimental = *kv->val == '1';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return parse_fss(ctxt, value, NULL);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user