forgot something

This commit is contained in:
dimok321 2010-02-27 18:54:42 +00:00
parent 714aafa267
commit eb052a0fe9
3 changed files with 6 additions and 3 deletions

View File

@ -10,7 +10,7 @@ extern "C" {
bool Load_Dol(void **buffer, int* dollen, char * path);
bool Remove_001_Protection(void *Address, int Size);
u32 load_dol_image(void * dolstart);
u32 Load_Dol_from_disc(u32 doloffset, u8 videoSelected, u8 patchcountrystring, u8 vipatch);
u32 Load_Dol_from_disc(u32 doloffset, u8 videoSelected, u8 patchcountrystring, u8 vipatch, u8 cheat);
#ifdef __cplusplus
}

View File

@ -440,7 +440,7 @@ s32 Apploader_Run(entry_point *entry, u8 cheat, u8 videoSelected, u8 vipatch, u8
FST_ENTRY *fst = (FST_ENTRY *)*(u32 *)0x80000038;
*entry = (entry_point) Load_Dol_from_disc(fst[alternatedoloffset].fileoffset, videoSelected, patchcountrystring, vipatch);
*entry = (entry_point) Load_Dol_from_disc(fst[alternatedoloffset].fileoffset, videoSelected, patchcountrystring, vipatch, cheat);
if (*entry == 0)
SYS_ResetSystem(SYS_RETURNTOMENU, 0, 0);

View File

@ -295,11 +295,14 @@ s32 Disc_BootPartition(u64 offset, u8 videoselected, u8 cheat, u8 vipatch, u8 pa
if (ret < 0)
return ret;
bool cheatloaded = false;
if (cheat == 1) {
/* OCARINA STUFF - FISHEARS*/
if(ocarina_load_code((u8 *) gameid) > 0)
{
ocarina_do_code();
cheatloaded = true;
}
}
@ -335,7 +338,7 @@ s32 Disc_BootPartition(u64 offset, u8 videoselected, u8 cheat, u8 vipatch, u8 pa
appentrypoint = (u32) p_entry;
if (cheat == 1)
if (cheat == 1 && cheatloaded)
{
__asm__(
"lis %r3, appentrypoint@h\n"