mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2025-01-26 18:45:28 +01:00
-fixed exit wiiflow freeze
This commit is contained in:
parent
e4bb926948
commit
bd7d0a5374
@ -14,6 +14,13 @@
|
|||||||
#include "gecko.h"
|
#include "gecko.h"
|
||||||
#include "mem2.hpp"
|
#include "mem2.hpp"
|
||||||
|
|
||||||
|
#define STACK_ALIGN(type, name, cnt, alignment) \
|
||||||
|
u8 _al__##name[((sizeof(type)*(cnt)) + (alignment) + \
|
||||||
|
(((sizeof(type)*(cnt))%(alignment)) > 0 ? ((alignment) - \
|
||||||
|
((sizeof(type)*(cnt))%(alignment))) : 0))]; \
|
||||||
|
type *name = (type*)(((u32)(_al__##name)) + ((alignment) - (( \
|
||||||
|
(u32)(_al__##name))&((alignment)-1))))
|
||||||
|
|
||||||
GXRModeObj * __Disc_SelectVMode(u8 videoselected, u64 chantitle);
|
GXRModeObj * __Disc_SelectVMode(u8 videoselected, u64 chantitle);
|
||||||
void PatchCountryStrings(void *Address, int Size);
|
void PatchCountryStrings(void *Address, int Size);
|
||||||
void __Disc_SetLowMem(void);
|
void __Disc_SetLowMem(void);
|
||||||
@ -319,3 +326,13 @@ u8 *GetDol(u64 title, u32 bootcontent)
|
|||||||
gprintf("Failed!\n");
|
gprintf("Failed!\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
s32 WiiFlow_LaunchTitle(u64 titleID)
|
||||||
|
{
|
||||||
|
u32 numviews;
|
||||||
|
STACK_ALIGN(tikview,views,4,32);
|
||||||
|
|
||||||
|
ES_GetNumTicketViews(titleID, &numviews);
|
||||||
|
ES_GetTicketViews(titleID, views, numviews);
|
||||||
|
return ES_LaunchTitle(titleID, &views[0]);
|
||||||
|
}
|
||||||
|
@ -13,11 +13,13 @@ s32 BootChannel(u32 entry, u64 chantitle, u32 ios, u8 vidMode, bool vipatch, boo
|
|||||||
u32 LoadChannel(u8 *buffer);
|
u32 LoadChannel(u8 *buffer);
|
||||||
void PatchChannel(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, u8 patchVidModes, int aspectRatio);
|
void PatchChannel(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, u8 patchVidModes, int aspectRatio);
|
||||||
|
|
||||||
u8 * GetDol(u64 title, u32 bootcontent);
|
u8 *GetDol(u64 title, u32 bootcontent);
|
||||||
|
|
||||||
bool Identify(u64 titleid, u32 *ios);
|
bool Identify(u64 titleid, u32 *ios);
|
||||||
bool Identify_GenerateTik(signed_blob **outbuf, u32 *outlen);
|
bool Identify_GenerateTik(signed_blob **outbuf, u32 *outlen);
|
||||||
|
|
||||||
|
s32 WiiFlow_LaunchTitle(u64 titleID);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
@ -1,15 +1,17 @@
|
|||||||
|
|
||||||
|
#include <ogc/machine/processor.h>
|
||||||
|
#include <ogc/lwp_threads.h>
|
||||||
|
#include <ogc/lwp_watchdog.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <ogcsys.h>
|
#include <ogcsys.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#include "wiiuse/wpad.h"
|
#include "wiiuse/wpad.h"
|
||||||
#include "mem2.hpp"
|
#include "mem2.hpp"
|
||||||
#include <string.h>
|
|
||||||
#include <ogc/lwp_threads.h>
|
|
||||||
#include <ogc/lwp_watchdog.h>
|
|
||||||
#include "sys.h"
|
#include "sys.h"
|
||||||
#include "gecko.h"
|
#include "gecko.h"
|
||||||
|
#include "channel_launcher.h"
|
||||||
#include <ogc/machine/processor.h>
|
|
||||||
#include "sha1.h"
|
#include "sha1.h"
|
||||||
#include "fs.h"
|
#include "fs.h"
|
||||||
#include "mem2.hpp"
|
#include "mem2.hpp"
|
||||||
@ -109,10 +111,10 @@ void Sys_Exit(void)
|
|||||||
IOS_ReloadIOS(254);
|
IOS_ReloadIOS(254);
|
||||||
|
|
||||||
//else
|
//else
|
||||||
if(WII_LaunchTitle(HBC_108) < 0)
|
if(WiiFlow_LaunchTitle(HBC_108) < 0)
|
||||||
if(WII_LaunchTitle(HBC_HAXX) < 0)
|
if(WiiFlow_LaunchTitle(HBC_HAXX) < 0)
|
||||||
if(WII_LaunchTitle(HBC_JODI) < 0)
|
if(WiiFlow_LaunchTitle(HBC_JODI) < 0)
|
||||||
WII_ReturnToMenu(); //SYS_ResetSystem doesnt work properly with new libogc
|
WiiFlow_LaunchTitle(0x100000002LL); //SYS_ResetSystem doesnt work properly with new libogc
|
||||||
}
|
}
|
||||||
|
|
||||||
void __Sys_ResetCallback(void)
|
void __Sys_ResetCallback(void)
|
||||||
@ -135,7 +137,7 @@ void Sys_Init(void)
|
|||||||
void Sys_LoadMenu(void)
|
void Sys_LoadMenu(void)
|
||||||
{
|
{
|
||||||
/* Return to the Wii system menu */
|
/* Return to the Wii system menu */
|
||||||
WII_ReturnToMenu(); //SYS_ResetSystem doesnt work properly with new libogc
|
WiiFlow_LaunchTitle(0x100000002LL); //SYS_ResetSystem doesnt work properly with new libogc
|
||||||
}
|
}
|
||||||
|
|
||||||
void __dsp_shutdown(void)
|
void __dsp_shutdown(void)
|
||||||
|
@ -764,7 +764,7 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool DML)
|
|||||||
DML_New_WriteOptions();
|
DML_New_WriteOptions();
|
||||||
|
|
||||||
WII_Initialize();
|
WII_Initialize();
|
||||||
if(WII_LaunchTitle(0x100000100LL) < 0)
|
if(WiiFlow_LaunchTitle(0x100000100LL) < 0)
|
||||||
Sys_LoadMenu();
|
Sys_LoadMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1072,7 +1072,7 @@ void CMenu::_launchChannel(dir_discHdr *hdr)
|
|||||||
if(forwarder)
|
if(forwarder)
|
||||||
{
|
{
|
||||||
WII_Initialize();
|
WII_Initialize();
|
||||||
if (WII_LaunchTitle(hdr->hdr.chantitle) < 0)
|
if (WiiFlow_LaunchTitle(hdr->hdr.chantitle) < 0)
|
||||||
Sys_LoadMenu();
|
Sys_LoadMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user