R.I.P boot speed boost (for now)
This commit is contained in:
parent
b87dadbb72
commit
a302ad3bea
@ -19,18 +19,6 @@ typedef struct __attribute__((packed))
|
|||||||
|
|
||||||
CFWInfo info = {0};
|
CFWInfo info = {0};
|
||||||
|
|
||||||
int __attribute__((naked)) svcGetCFWInfo(CFWInfo __attribute__((unused)) *out)
|
|
||||||
{
|
|
||||||
__asm__ volatile("svc 0x2E; bx lr");
|
|
||||||
}
|
|
||||||
|
|
||||||
static void loadCFWInfo(void)
|
|
||||||
{
|
|
||||||
static bool infoLoaded = false;
|
|
||||||
if(!infoLoaded) svcGetCFWInfo(&info);
|
|
||||||
infoLoaded = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifndef PATH_MAX
|
#ifndef PATH_MAX
|
||||||
#define PATH_MAX 255
|
#define PATH_MAX 255
|
||||||
#define CONFIG(a) (((info.config >> (a + 16)) & 1) != 0)
|
#define CONFIG(a) (((info.config >> (a + 16)) & 1) != 0)
|
||||||
@ -118,6 +106,26 @@ static int fileOpen(IFile *file, FS_ArchiveID archiveId, const char *path, int f
|
|||||||
return IFile_Open(file, archiveId, archivePath, filePath, flags);
|
return IFile_Open(file, archiveId, archivePath, filePath, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int __attribute__((naked)) svcGetCFWInfo(CFWInfo __attribute__((unused)) *out)
|
||||||
|
{
|
||||||
|
__asm__ volatile("svc 0x2E; bx lr");
|
||||||
|
}
|
||||||
|
|
||||||
|
static void loadCFWInfo(void)
|
||||||
|
{
|
||||||
|
static bool infoLoaded = false;
|
||||||
|
if(!infoLoaded)
|
||||||
|
{
|
||||||
|
svcGetCFWInfo(&info);
|
||||||
|
IFile file;
|
||||||
|
if(R_SUCCEEDED(fileOpen(&file, ARCHIVE_SDMC, "/", FS_OPEN_READ))) //init SD card for firmlaunch patches
|
||||||
|
{
|
||||||
|
IFile_Close(&file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
infoLoaded = true;
|
||||||
|
}
|
||||||
|
|
||||||
static bool secureInfoExists(void)
|
static bool secureInfoExists(void)
|
||||||
{
|
{
|
||||||
static bool exists = false;
|
static bool exists = false;
|
||||||
|
Reference in New Issue
Block a user