mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2025-01-11 19:39:09 +01:00
-slightly changed GC disc and DML launching, gc retail discs with audio streaming doesn't work for some reason, trying to find out why
This commit is contained in:
parent
f6c23a67ee
commit
8d432c1dc5
@ -545,14 +545,11 @@ extern "C" {extern void USBStorage_Deinit(void);}
|
|||||||
|
|
||||||
void CMenu::_launchGC(const char *id, bool DML)
|
void CMenu::_launchGC(const char *id, bool DML)
|
||||||
{
|
{
|
||||||
|
Nand::Instance()->Disable_Emu();
|
||||||
u8 DMLvideoMode = min((u32)m_gcfg2.getInt(id, "dml_video_mode", 0), ARRAY_SIZE(CMenu::_DMLvideoModes) - 1u);
|
u8 DMLvideoMode = min((u32)m_gcfg2.getInt(id, "dml_video_mode", 0), ARRAY_SIZE(CMenu::_DMLvideoModes) - 1u);
|
||||||
if (!DML)
|
if (!DML)
|
||||||
DMLvideoMode = 0;
|
DMLvideoMode = 0;
|
||||||
Close_Inputs();
|
else
|
||||||
USBStorage_Deinit();
|
|
||||||
Nand::Instance()->Disable_Emu();
|
|
||||||
|
|
||||||
if (DML)
|
|
||||||
{
|
{
|
||||||
char filepath[ISFS_MAXPATH] ATTRIBUTE_ALIGN(32);
|
char filepath[ISFS_MAXPATH] ATTRIBUTE_ALIGN(32);
|
||||||
FILE *f;
|
FILE *f;
|
||||||
@ -560,20 +557,17 @@ void CMenu::_launchGC(const char *id, bool DML)
|
|||||||
f = fopen(filepath, "wb");
|
f = fopen(filepath, "wb");
|
||||||
fwrite(id, 1, 6, f);
|
fwrite(id, 1, 6, f);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
}
|
|
||||||
|
|
||||||
|
Close_Inputs();
|
||||||
|
USBStorage_Deinit();
|
||||||
cleanup();
|
cleanup();
|
||||||
|
|
||||||
if (DML)
|
|
||||||
{
|
|
||||||
memcpy((char *)0x80000000, id, 6);
|
memcpy((char *)0x80000000, id, 6);
|
||||||
|
|
||||||
// Tell DML to boot the game from sd card
|
// Tell DML to boot the game from sd card
|
||||||
*(u32 *)0x80001800 = 0xB002D105;
|
*(u32 *)0x80001800 = 0xB002D105;
|
||||||
DCFlushRange((void *)(0x80001800), 4);
|
DCFlushRange((void *)(0x80001800), 4);
|
||||||
ICInvalidateRange((void *)(0x80001800), 4);
|
ICInvalidateRange((void *)(0x80001800), 4);
|
||||||
|
|
||||||
*(volatile unsigned int *)0xCC003024 |= 7;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setstreaming();
|
setstreaming();
|
||||||
@ -614,6 +608,8 @@ void CMenu::_launchGC(const char *id, bool DML)
|
|||||||
VIDEO_Flush();
|
VIDEO_Flush();
|
||||||
VIDEO_WaitVSync();
|
VIDEO_WaitVSync();
|
||||||
|
|
||||||
|
*(volatile unsigned int *)0xCC003024 |= 7;
|
||||||
|
|
||||||
if (WII_LaunchTitle(0x0000000100000100ULL)<0)
|
if (WII_LaunchTitle(0x0000000100000100ULL)<0)
|
||||||
Sys_LoadMenu();
|
Sys_LoadMenu();
|
||||||
}
|
}
|
||||||
@ -1070,15 +1066,16 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cleanup();
|
||||||
|
Close_Inputs();
|
||||||
|
USBStorage_Deinit();
|
||||||
|
|
||||||
if (gc)
|
if (gc)
|
||||||
{
|
{
|
||||||
_launchGC(id.c_str(),false);
|
_launchGC(id.c_str(),false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cleanup();
|
|
||||||
Close_Inputs();
|
|
||||||
USBStorage_Deinit();
|
|
||||||
gprintf("Booting game\n");
|
gprintf("Booting game\n");
|
||||||
if (Disc_WiiBoot(videoMode, vipatch, countryPatch, patchVidMode) < 0)
|
if (Disc_WiiBoot(videoMode, vipatch, countryPatch, patchVidMode) < 0)
|
||||||
Sys_LoadMenu();
|
Sys_LoadMenu();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user