mirror of
https://gitlab.com/Nanolx/homebrewfilter.git
synced 2024-11-24 10:09:21 +01:00
properly exit from installer, if THBF channel is not installed
This commit is contained in:
parent
39d82bbd3e
commit
90582812fc
@ -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;
|
||||
}
|
@ -3,5 +3,6 @@
|
||||
|
||||
bool listIOS();
|
||||
bool getIOS(int ios);
|
||||
s32 GetTMD(u64 TicketID, signed_blob **Output, u32 *Length);
|
||||
|
||||
#endif
|
@ -6,6 +6,7 @@
|
||||
#include "menu.h"
|
||||
#include "video.h"
|
||||
#include "wad.h"
|
||||
#include "getios.h"
|
||||
|
||||
#define HAVE_AHBPROT ((*(vu32*)0xcd800064 == 0xFFFFFFFF) ? 1 : 0)
|
||||
|
||||
@ -25,7 +26,23 @@ int main(int argc, char **argv) {
|
||||
|
||||
menu();
|
||||
|
||||
WII_LaunchTitle(0x0001000154484246);
|
||||
signed_blob *p_tmd = NULL;
|
||||
u32 len;
|
||||
s32 ret;
|
||||
|
||||
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;
|
||||
}
|
||||
|
2
updates
2
updates
@ -13,6 +13,8 @@
|
||||
- for wiiload there are now two options to choose which IOS to
|
||||
use and whether to reload it
|
||||
- BUGFIX: fix compilation with libOGC 1.8.11 and newer
|
||||
- BUGFIX: installer upon exit checks whether THBF channel is installed,
|
||||
if so, it will start the HomebrewFilter, else it enters SysMenu
|
||||
|
||||
//rev38:
|
||||
- changes to the app-info dialog:
|
||||
|
Loading…
Reference in New Issue
Block a user