simplify commit 90582812fc

This commit is contained in:
Christopher Roy Bratusek 2012-05-20 10:32:08 +02:00
parent 7e09b8086b
commit 4622e2fa3a
3 changed files with 6 additions and 43 deletions

View File

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

View File

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