mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-12-25 03:11:58 +01:00
-added dollz support for homebrew launching
(-giving the possibility for the project to re-arrange and control everything properly :P)
This commit is contained in:
parent
063fab9774
commit
b661ccb551
@ -25,6 +25,19 @@ static safe_vector<std::string> Arguments;
|
|||||||
|
|
||||||
bool bootHB;
|
bool bootHB;
|
||||||
|
|
||||||
|
bool IsDollZ (u8 *buff)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
u8 dollz_stamp[] = {0x3C};
|
||||||
|
int dollz_offs = 0x100;
|
||||||
|
|
||||||
|
ret = memcmp (&buff[dollz_offs], dollz_stamp, sizeof(dollz_stamp));
|
||||||
|
if (ret == 0) return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void AddBootArgument(const char * argv)
|
void AddBootArgument(const char * argv)
|
||||||
{
|
{
|
||||||
std::string arg(argv);
|
std::string arg(argv);
|
||||||
@ -118,6 +131,7 @@ int BootHomebrew()
|
|||||||
if(homebrewsize == 0) return -1;
|
if(homebrewsize == 0) return -1;
|
||||||
|
|
||||||
struct __argv args;
|
struct __argv args;
|
||||||
|
if (!IsDollZ(homebrewbuffer))
|
||||||
SetupARGV(&args);
|
SetupARGV(&args);
|
||||||
|
|
||||||
memcpy(BOOTER_ADDR, app_booter_bin, app_booter_bin_size);
|
memcpy(BOOTER_ADDR, app_booter_bin, app_booter_bin_size);
|
||||||
@ -125,11 +139,9 @@ int BootHomebrew()
|
|||||||
|
|
||||||
entrypoint entry = (entrypoint) BOOTER_ADDR;
|
entrypoint entry = (entrypoint) BOOTER_ADDR;
|
||||||
|
|
||||||
if (args.argvMagic == ARGV_MAGIC)
|
|
||||||
{
|
|
||||||
memmove(ARGS_ADDR, &args, sizeof(args));
|
memmove(ARGS_ADDR, &args, sizeof(args));
|
||||||
DCFlushRange(ARGS_ADDR, sizeof(args) + args.length);
|
DCFlushRange(ARGS_ADDR, sizeof(args) + args.length);
|
||||||
}
|
|
||||||
SYS_ResetSystem(SYS_SHUTDOWN, 0, 0);
|
SYS_ResetSystem(SYS_SHUTDOWN, 0, 0);
|
||||||
entry();
|
entry();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user