mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-27 13:44:15 +01:00
-fixed really cruel bug in memory clearing which cleared nothing
at all :P -(hopefully) fixed game launching properly
This commit is contained in:
parent
5716a3a225
commit
a728a96480
@ -170,16 +170,13 @@ GXRModeObj * __Disc_SelectVMode(u8 videoselected, u64 chantitle)
|
|||||||
|
|
||||||
void __Disc_SetVMode(void)
|
void __Disc_SetVMode(void)
|
||||||
{
|
{
|
||||||
// Stop wait message thread
|
|
||||||
extern void HideWaitMessage();
|
|
||||||
HideWaitMessage();
|
|
||||||
|
|
||||||
/* Set video mode register */
|
/* Set video mode register */
|
||||||
*(vu32 *)0x800000CC = vmode_reg;
|
*(vu32 *)0x800000CC = vmode_reg;
|
||||||
|
|
||||||
/* Set video mode */
|
/* Set video mode */
|
||||||
if (vmode != 0) VIDEO_Configure(vmode);
|
if (vmode != 0)
|
||||||
|
VIDEO_Configure(vmode);
|
||||||
|
|
||||||
/* Setup video */
|
/* Setup video */
|
||||||
VIDEO_SetBlack(TRUE);
|
VIDEO_SetBlack(TRUE);
|
||||||
VIDEO_Flush();
|
VIDEO_Flush();
|
||||||
@ -355,24 +352,32 @@ s32 Disc_BootPartition(u64 offset, u8 vidMode, bool vipatch, bool countryString,
|
|||||||
IOSReloadBlock(IOS_GetVersion(), false);
|
IOSReloadBlock(IOS_GetVersion(), false);
|
||||||
else
|
else
|
||||||
IOSReloadBlock(IOS_GetVersion(), true);
|
IOSReloadBlock(IOS_GetVersion(), true);
|
||||||
|
|
||||||
s32 ret = WDVD_OpenPartition(offset, 0, 0, 0, Tmd_Buffer);
|
s32 ret = WDVD_OpenPartition(offset, 0, 0, 0, Tmd_Buffer);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
/* Select an appropriate video mode */
|
/* Greenscreen Fix */
|
||||||
__Disc_SelectVMode(vidMode, 0);
|
VIDEO_SetBlack(TRUE);
|
||||||
|
VIDEO_Flush();
|
||||||
|
VIDEO_WaitVSync();
|
||||||
|
|
||||||
|
/* Clear memory */
|
||||||
|
MEM2_clear();
|
||||||
|
|
||||||
/* Setup low memory */;
|
/* Setup low memory */;
|
||||||
__Disc_SetLowMem();
|
__Disc_SetLowMem();
|
||||||
|
|
||||||
|
/* Select an appropriate video mode */
|
||||||
|
__Disc_SelectVMode(vidMode, 0);
|
||||||
|
|
||||||
/* Run apploader */
|
/* Run apploader */
|
||||||
ret = Apploader_Run(&p_entry, vidMode, vmode, vipatch, countryString, patchVidMode, aspectRatio);
|
ret = Apploader_Run(&p_entry, vidMode, vmode, vipatch, countryString, patchVidMode, aspectRatio);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
free_wip();
|
free_wip();
|
||||||
|
|
||||||
if (hooktype != 0)
|
if (hooktype != 0)
|
||||||
ocarina_do_code();
|
ocarina_do_code();
|
||||||
|
|
||||||
|
@ -166,6 +166,8 @@ static void __dsp_shutdown()
|
|||||||
//Modified libogc call
|
//Modified libogc call
|
||||||
void Sys_Shutdown(void)
|
void Sys_Shutdown(void)
|
||||||
{
|
{
|
||||||
|
Close_Inputs();
|
||||||
|
|
||||||
__dsp_shutdown();
|
__dsp_shutdown();
|
||||||
u32 ret = __PADDisableRecalibration(TRUE);
|
u32 ret = __PADDisableRecalibration(TRUE);
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ void CMEM2Alloc::cleanup(void)
|
|||||||
void CMEM2Alloc::clear(void)
|
void CMEM2Alloc::clear(void)
|
||||||
{
|
{
|
||||||
m_first = 0;
|
m_first = 0;
|
||||||
memset(m_baseAddress, 0, (u8 *)m_endAddress - (u8 *)m_endAddress);
|
memset(m_baseAddress, 0, (u8 *)m_endAddress - (u8 *)m_baseAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int CMEM2Alloc::usableSize(void *p)
|
unsigned int CMEM2Alloc::usableSize(void *p)
|
||||||
|
@ -1286,6 +1286,10 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
|
|||||||
if(currentPartition == 0)
|
if(currentPartition == 0)
|
||||||
SDHC_Init();
|
SDHC_Init();
|
||||||
|
|
||||||
|
// Stop wait message thread
|
||||||
|
m_vid.hideWaitMessage();
|
||||||
|
usleep(100 * 1000);
|
||||||
|
|
||||||
gprintf("Booting game\n");
|
gprintf("Booting game\n");
|
||||||
if (Disc_WiiBoot(videoMode, vipatch, countryPatch, patchVidMode, disableIOSreload, aspectRatio) < 0)
|
if (Disc_WiiBoot(videoMode, vipatch, countryPatch, patchVidMode, disableIOSreload, aspectRatio) < 0)
|
||||||
Sys_LoadMenu();
|
Sys_LoadMenu();
|
||||||
|
Loading…
Reference in New Issue
Block a user