From 357d1a19769b8515bd332c87db19315f05e9314e Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Sat, 7 Apr 2012 18:50:06 +0200 Subject: [PATCH] return to HBF feature works again removed a bit of unused code only check for priiloader when entering loader prompt --- installer/wad/0001000154484246.tmd | Bin 592 -> 592 bytes source/Prompts/prompt_loader.cpp | 7 ++++++ source/Tools/SelectIos.cpp | 6 +++--- source/Tools/load_channel.cpp | 33 ++++++++++++++++++++++++----- source/main.cpp | 19 +---------------- updates | 1 + 6 files changed, 40 insertions(+), 26 deletions(-) diff --git a/installer/wad/0001000154484246.tmd b/installer/wad/0001000154484246.tmd index 9cfd95793fdbed28a4f29b49994c61d62a468b1f..76ba7402fa0a8640f06768d1300f9a00d1dc2b1a 100644 GIT binary patch delta 31 ncmcb>a)D)oC6l<0nZxUlkdSvhH!I#{PB|HF*4(brl79pM(V7k= delta 31 pcmV+)0O0@71kePqIRY0aM&OaT8z!)o+RoiB`jY7;JNpVSCkWcz4YdFO diff --git a/source/Prompts/prompt_loader.cpp b/source/Prompts/prompt_loader.cpp index 6cbd567..166cd2b 100644 --- a/source/Prompts/prompt_loader.cpp +++ b/source/Prompts/prompt_loader.cpp @@ -13,12 +13,19 @@ extern GuiWindow * mainWindow; extern void ResumeGui(); extern void HaltGui(); +int priicheck = 0; + int loaderPrompt() { bool stop = false; int menu = 0; listIOS(); + if( ! priicheck ) + { + priicheck = 1; + check_priiloader(); + } GuiWindow promptWindow(520,360); promptWindow.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); diff --git a/source/Tools/SelectIos.cpp b/source/Tools/SelectIos.cpp index bd1b08d..22f1eca 100644 --- a/source/Tools/SelectIos.cpp +++ b/source/Tools/SelectIos.cpp @@ -15,7 +15,6 @@ int bootmii = 0; int nandemu = 0; int priiloader = 0; - s32 NandReadFile(char *filepath, u8 **buffer, u32 *filesize) { s32 Fd; @@ -126,7 +125,7 @@ int check_priiloader() { u32 i = 0; u32 filesize = 0; u8 *buffer = NULL; - const char *checkStr = "priiloader"; + const char* checkStr = "priiloader"; int retValue = -1; ret = GetTMD(titleId, &stmd, &TMD_size); @@ -347,8 +346,9 @@ bool listIOS() ioslist.push_back(titleID); } - std::sort( ioslist.begin(), ioslist.end() ); // sortieren + std::sort( ioslist.begin(), ioslist.end() ); // sortieren return true; + } int SelectedIOS() diff --git a/source/Tools/load_channel.cpp b/source/Tools/load_channel.cpp index 8351717..2ae0332 100644 --- a/source/Tools/load_channel.cpp +++ b/source/Tools/load_channel.cpp @@ -18,7 +18,7 @@ s8 free_pointer(pointer*& ptr) //protection incase empty type was given memset(ptr,0,sizeof(pointer)); } - free(ptr); + free(ptr); ptr = NULL; return 0; } @@ -48,12 +48,26 @@ bool CheckAppFound(u64 title) return false; } +u8 hbcStubAvailable() +{ + char * sig = (char *)0x80001804; + return ( + sig[0] == 'S' && + sig[1] == 'T' && + sig[2] == 'U' && + sig[3] == 'B' && + sig[4] == 'H' && + sig[5] == 'A' && + sig[6] == 'X' && + sig[7] == 'X') ? 1 : 0; +} + int DetectHBF() { u64 *list; u32 titlecount; int ret; - + vector TitleID; TitleID.push_back(0x0001000154484246LL); //THBF // TitleID.push_back(0x0001000148424630LL); //HBF0 @@ -74,9 +88,9 @@ int DetectHBF() return 0; } ret = 0; - + //lets check for known HBF title id's. - for(u32 i=0; i