Autohook games with VI hooktype when a USB gecko is detected in slot 2 so WiiRD works without having to turn on ocarina.

*may lead to false positives for some GC memory cards in slot 2, but the only side effect would be hooking the game when it wasn't wanted to be hooked*

fix i bug created by svn merging
Call to start BC for GC is still present 2x.  I left one so if the first doesn't work, it can be removed and the second will be used.
This commit is contained in:
giantpune 2009-09-29 08:47:07 +00:00
parent 4d6e0fe412
commit 2b47c635ed
3 changed files with 6 additions and 9 deletions

View File

@ -336,7 +336,8 @@ int MenuDiscList() {
char dvdID[8]; char dvdID[8];
if (!dvdheader) if (!dvdheader)
dvdheader = new struct discHdr; dvdheader = new struct discHdr;
WDVD_GetCoverStatus(&covert); WDVD_GetCoverStatus(&covert);
u32 covertOld=covert; u32 covertOld=covert;

View File

@ -1809,13 +1809,6 @@ int GameSettings(struct discHdr * header) {
} }
else sprintf(gameName, "%c%c%c%c%c%c", header->id[0], header->id[1], header->id[2],header->id[3], header->id[4], header->id[5]); else sprintf(gameName, "%c%c%c%c%c%c", header->id[0], header->id[1], header->id[2],header->id[3], header->id[4], header->id[5]);
if (strlen(get_title(header)) < (27 + 3)) {
strcpy(gameName, get_title(header));
} else {
strlcpy(gameName, get_title(header), 27+1);
strcat(gameName, "...");
}
GuiText titleTxt(!dvdMounted?get_title(header):gameName, 28, (GXColor) {0, 0, 0, 255}); GuiText titleTxt(!dvdMounted?get_title(header):gameName, 28, (GXColor) {0, 0, 0, 255});
titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
titleTxt.SetPosition(12,40); titleTxt.SetPosition(12,40);

View File

@ -292,6 +292,9 @@ s32 Apploader_Run(entry_point *entry, u8 cheat, u8 videoSelected, u8 vipatch, u8
u32 appldr_len; u32 appldr_len;
s32 ret; s32 ret;
u32 geckoattached = usb_isgeckoalive(EXI_CHANNEL_1);
if (geckoattached)usb_flush(EXI_CHANNEL_1);
/* Read apploader header */ /* Read apploader header */
ret = WDVD_Read(buffer, 0x20, APPLDR_OFFSET); ret = WDVD_Read(buffer, 0x20, APPLDR_OFFSET);
@ -337,7 +340,7 @@ s32 Apploader_Run(entry_point *entry, u8 cheat, u8 videoSelected, u8 vipatch, u8
*(u32 *)0x80003140 = *(u32 *)0x80003188; *(u32 *)0x80003140 = *(u32 *)0x80003188;
} }
if (cheat) { if (cheat || geckoattached) {
/*HOOKS STUFF - FISHEARS*/ /*HOOKS STUFF - FISHEARS*/
memset((void*)0x80001800,0,kenobiwii_size); memset((void*)0x80001800,0,kenobiwii_size);
memcpy((void*)0x80001800,kenobiwii,kenobiwii_size); memcpy((void*)0x80001800,kenobiwii,kenobiwii_size);