Revert "simplify commit 90582812fccc509de5f796c31477790f747e7f23"

This reverts commit 4622e2fa3a.
This commit is contained in:
Christopher Roy Bratusek 2012-06-01 12:17:17 +02:00
parent cb25758f96
commit 6af658a98d
3 changed files with 43 additions and 6 deletions

View File

@ -141,3 +141,35 @@ bool getIOS(int ios)
return false;
}
s32 GetTMD(u64 TicketID, signed_blob **Output, u32 *Length)
{
signed_blob* TMD = NULL;
u32 TMD_Length;
s32 ret;
/* Retrieve TMD length */
ret = ES_GetStoredTMDSize(TicketID, &TMD_Length);
if (ret < 0)
return ret;
/* Allocate memory */
TMD = (signed_blob*)memalign(32, (TMD_Length+31)&(~31));
if (!TMD)
return IPC_ENOMEM;
/* Retrieve TMD */
ret = ES_GetStoredTMD(TicketID, TMD, TMD_Length);
if (ret < 0)
{
free(TMD);
return ret;
}
/* Set values */
*Output = TMD;
*Length = TMD_Length;
return 0;
}

View File

@ -26,17 +26,23 @@ int main(int argc, char **argv) {
menu();
if(CheckAppFound(GetTitleID()))
{
WII_LaunchTitle(0x0001000154484246);
signed_blob *p_tmd = NULL;
u32 len;
s32 ret;
}
else
ret = GetTMD(0x0001000154484246LL, &p_tmd, &len);
if(ret < 0)
{
*(vu32*)0x8132FFFB = 0x50756E65;
DCFlushRange((void*)0x8132FFFB, 4);
SYS_ResetSystem(SYS_RETURNTOMENU, 0, 0);
}
else
{
WII_LaunchTitle(0x0001000154484246);
}
return 0;
}

View File

@ -62,7 +62,6 @@ void fill_menu_main()
else
{
text1.push_back("");
text1.push_back("");
}
text1.push_back("");
text1.push_back("Copyright");