mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-12-28 12:51:52 +01:00
-fixed some things of r818
-slightly modified ios patching system
This commit is contained in:
parent
f6d08052d2
commit
aeee973e08
@ -37,6 +37,7 @@
|
||||
#include "nand.hpp"
|
||||
#include "gecko/gecko.hpp"
|
||||
#include "loader/fs.h"
|
||||
#include "loader/sys.h"
|
||||
#include "unzip/U8Archive.h"
|
||||
|
||||
#define IMET_OFFSET 0x40
|
||||
@ -168,7 +169,7 @@ void Banner::GetBanner(u64 title, char *appname, bool imetOnly)
|
||||
u8 *buf = NULL;
|
||||
u32 size = 0;
|
||||
s32 len = imetOnly ? sizeof(IMET) + IMET_OFFSET : -1;
|
||||
if(NandHandle.EmulationEnabled())
|
||||
if(NANDemuView)
|
||||
buf = NandHandle.GetEmuFile(appname, &size, len);
|
||||
else
|
||||
buf = ISFS_GetFile(appname, &size, len);
|
||||
|
@ -20,14 +20,10 @@ static bool apply_patch(char *name, const u8 *old, u32 old_size, const u8 *patch
|
||||
{
|
||||
found = true;
|
||||
location = ptr + patch_offset;
|
||||
u8 *start = location;
|
||||
u32 i;
|
||||
for(i = 0; i < patch_size; i++)
|
||||
{
|
||||
*location = patch[i];
|
||||
location++;
|
||||
}
|
||||
DCFlushRange((u8 *)(((u32)start) >> 5 << 5), (patch_size >> 5 << 5) + 64);
|
||||
location[i] = patch[i];
|
||||
DCFlushRange(location, patch_size);
|
||||
break;
|
||||
}
|
||||
ptr++;
|
||||
|
@ -1029,27 +1029,15 @@ s32 Nand::Do_Region_Change(string id)
|
||||
return 1;
|
||||
}
|
||||
|
||||
void Nand::Enable_ISFS_Patches(void)
|
||||
{
|
||||
if(AHBRPOT_Patched())
|
||||
Patch_ISFS_Permission(true);
|
||||
}
|
||||
|
||||
void Nand::Disable_ISFS_Patches(void)
|
||||
{
|
||||
if(AHBRPOT_Patched())
|
||||
Patch_ISFS_Permission(false);
|
||||
}
|
||||
|
||||
void Nand::Init_ISFS()
|
||||
{
|
||||
gprintf("Init ISFS\n");
|
||||
ISFS_Initialize();
|
||||
if(IOS_GetType(IOS_GetVersion()) == IOS_TYPE_NORMAL_IOS)
|
||||
if(IOS_GetVersion() < 222)
|
||||
{
|
||||
Enable_ISFS_Patches();
|
||||
Patch_ISFS_Permission(true);
|
||||
AccessPatched = true;
|
||||
}
|
||||
gprintf("Init ISFS\n");
|
||||
ISFS_Initialize();
|
||||
}
|
||||
|
||||
void Nand::DeInit_ISFS(bool KeepPatches)
|
||||
@ -1058,7 +1046,7 @@ void Nand::DeInit_ISFS(bool KeepPatches)
|
||||
ISFS_Deinitialize();
|
||||
if(AccessPatched && !KeepPatches)
|
||||
{
|
||||
Disable_ISFS_Patches();
|
||||
Patch_ISFS_Permission(false);
|
||||
AccessPatched = false;
|
||||
}
|
||||
}
|
||||
|
@ -106,8 +106,6 @@ private:
|
||||
|
||||
void PatchAHB(void);
|
||||
bool ISFS_Check(void);
|
||||
void Enable_ISFS_Patches(void);
|
||||
void Disable_ISFS_Patches(void);
|
||||
|
||||
void __Dec_Enc_TB(void);
|
||||
void __configshifttxt(char *str);
|
||||
|
Loading…
Reference in New Issue
Block a user