fix for "return to" logic.

look for the first of ULNR or UNEO
if neither are found, look for the first of JODI or HAXX
if none of the 4 are found, return without patching anything
This commit is contained in:
giantpune 2010-04-11 02:59:34 +00:00
parent 2af7d13868
commit 1beb161406
4 changed files with 8 additions and 7 deletions

View File

@ -2,8 +2,8 @@
<app version="1">
<name> USB Loader GX</name>
<coder>USB Loader GX Team</coder>
<version>1.0 r925</version>
<release_date>201004110116</release_date>
<version>1.0 r926</version>
<release_date>201004110250</release_date>
<short_description>Loads games from USB-devices</short_description>
<long_description>USB Loader GX is a libwiigui based USB iso loader with a wii-like GUI. You can install games to your HDDs and boot them with shorter loading times.
The interactive GUI is completely controllable with WiiMote, Classic Controller or GC Controller.

View File

@ -417,6 +417,7 @@ void vidolpatcher(void *addr, u32 len)
//giantpune's magic super patch to return to channels
bool PatchReturnTo(void *Address, int Size, u32 id) {
if( !id )return 0;
u8 SearchPattern[ 12 ] = { 0x38, 0x80, 0x00, 0x02, 0x38, 0x60, 0x00, 0x01, 0x38, 0xa0, 0x00, 0x00 };
u8 SearchPattern2[ 12 ] = { 0x4D, 0x65, 0x74, 0x72, 0x6F, 0x77, 0x65, 0x72, 0x6B, 0x73, 0x20, 0x54 };

View File

@ -355,8 +355,8 @@ s32 Apploader_Run(entry_point *entry, u8 cheat, u8 videoSelected, u8 vipatch, u8
u32 appldr_len;
s32 ret;
gprintf("Apploader_Run( %p, %d, %d, %d, %d, %d, %d, %d, %08x)\n", \
entry, cheat, videoSelected, vipatch, patchcountrystring, error002fix, alternatedol, alternatedoloffset, rtrn);
gprintf("Apploader_Run( %p, %d, %d, %d, %d, %d, %d, %d, %08x )\n", \
entry, cheat, videoSelected, vipatch, patchcountrystring, error002fix, alternatedol, alternatedoloffset, rtrn );
//u32 geckoattached = usb_isgeckoalive(EXI_CHANNEL_1);
//if (geckoattached)usb_flush(EXI_CHANNEL_1);
@ -455,7 +455,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, cheat, rtrn);
*entry = (entry_point) Load_Dol_from_disc(fst[alternatedoloffset].fileoffset, videoSelected, patchcountrystring, vipatch, cheat, rtrn );
if (*entry == 0)
SYS_ResetSystem(SYS_RETURNTOMENU, 0, 0);

View File

@ -966,16 +966,16 @@ u32 GetReturnToTitle()
free(list);
return 0;
}
for(i=0; i<titlecount; i++) {
if (list[i]==TITLE_ID(0x00010001,0x554c4e52)
|| list[i]==TITLE_ID(0x00010001,0x554e454f))
{
tid = list[i];
break;
}
}
for(i=0; i<titlecount; i++) {
for(i=0; i<titlecount && !tid ; i++) {
if (list[i]==TITLE_ID(0x00010001,0x4A4F4449)
|| list[i]==TITLE_ID(0x00010001,0x48415858))
{