usbloadergx/source/lstub.h
giantpune b753af6d4d sprinkled gprintf() throughout the source some more.
added functions to mess with the "return to" stub.  everything should be working right, but if i messed up, it may cause you not to be able to exit the program (it could just keep restarting itself).  now when booting homebrew, they should exit back to this program if you have a channel installed as UNEO or ULNR.  priority is given to UNEO if both are present.
2009-10-20 23:00:19 +00:00

38 lines
961 B
C

//small group of functions to manipulate the HBC stub
//brought to you by giantpune
#ifndef _LSTUB_H_
#define _LSTUB_H_
#ifdef __cplusplus
extern "C" {
#endif
//to set the "return to" stub for a certain ID
//!reqID is the Requested ID to return to
//!returns WII_EINTERNAL if it cant get the list of installed titles with ES functions
//!retuns -69 if the ID is not installed
//!1 if successful
s32 Set_Stub(u64 reqID);
//!same as the above function, but expects a type and 4 char channel ID
s32 Set_Stub_Split(u32 type, const char* reqID);
//load the default HBC stub into memory. as long as nothing writes to the 0x80001800
// +0xDC7 memory block it will stay there. by default it has 0x00010001/JODI.
void loadStub();
//get whatever ID the stub is set to load
//!returns 0 if no stub is loaded into memory (must be the HBC stub at 0x800018000)
//!otherwise returns the ID set to return to
u64 getStubDest();
#ifdef __cplusplus
}
#endif
#endif