From ac3816d7e96bf65c261ebe8b5b951bcb3ad32a11 Mon Sep 17 00:00:00 2001 From: "fix94.1" Date: Thu, 12 Jul 2012 00:34:32 +0000 Subject: [PATCH] -only enable gc streaming if we actually boot a disc -moved ios reload block call directly behind return to channel call --- source/loader/disc.c | 5 +++-- source/loader/disc.h | 2 +- source/loader/gc_disc_dump.cpp | 2 +- source/menu/menu_game.cpp | 6 +++--- source/menu/menu_wbfs.cpp | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/source/loader/disc.c b/source/loader/disc.c index 6e91f027..636210e4 100644 --- a/source/loader/disc.c +++ b/source/loader/disc.c @@ -248,7 +248,7 @@ s32 Disc_Init(void) return WDVD_Init(); } -s32 Disc_Open(void) +s32 Disc_Open(bool boot_disc) { /* Reset drive */ s32 ret = WDVD_Reset(); @@ -260,7 +260,8 @@ s32 Disc_Open(void) ret = WDVD_ReadDiskId(diskid); /* Directly set Audio Streaming for GC*/ - gprintf("Setting Audio Streaming for GC Games: 0x%08x\n", WDVD_SetStreaming()); + if(boot_disc) + gprintf("Setting Audio Streaming for GC Games: 0x%08x\n", WDVD_SetStreaming()); return ret; } diff --git a/source/loader/disc.h b/source/loader/disc.h index 886367e8..fab2e9c6 100644 --- a/source/loader/disc.h +++ b/source/loader/disc.h @@ -95,7 +95,7 @@ extern "C" { /* Prototypes */ s32 Disc_Init(void); -s32 Disc_Open(void); +s32 Disc_Open(bool); s32 Disc_Wait(void); s32 Disc_SetUSB(const u8 *); s32 Disc_ReadHeader(void *); diff --git a/source/loader/gc_disc_dump.cpp b/source/loader/gc_disc_dump.cpp index 4656bab9..8d30e0d3 100644 --- a/source/loader/gc_disc_dump.cpp +++ b/source/loader/gc_disc_dump.cpp @@ -199,7 +199,7 @@ bool GCDump::__WaitForDisc(u8 dsc, u32 msg) if(Disc_Wait() < 0) continue; - if(Disc_Open() < 0) + if(Disc_Open(true) < 0) { MEM2_free(ReadBuffer); return false; diff --git a/source/menu/menu_game.cpp b/source/menu/menu_game.cpp index eec1cf7d..467d36f0 100644 --- a/source/menu/menu_game.cpp +++ b/source/menu/menu_game.cpp @@ -1120,7 +1120,7 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd) } while(!(cover & 0x2)); } /* Open Disc */ - if (Disc_Open() < 0) + if (Disc_Open(true) < 0) { error(_t("wbfsoperr2", L"Disc_Open failed")); if (BTN_B_PRESSED) return; @@ -1308,6 +1308,7 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd) IOS_Close(ESHandle); } } + IOSReloadBlock(IOS_GetVersion(), true); if(emulate_mode) { Nand::Instance()->Init(emuPath.c_str(), emuPartition, false); @@ -1342,14 +1343,13 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd) return; } - if (Disc_Open() < 0) + if (Disc_Open(false) < 0) { error(_t("wbfsoperr2", L"Disc_Open failed")); if (iosLoaded) Sys_LoadMenu(); return; } } - IOSReloadBlock(IOS_GetVersion(), true); USBStorage_Deinit(); if(currentPartition == 0) diff --git a/source/menu/menu_wbfs.cpp b/source/menu/menu_wbfs.cpp index 7637501e..e2d91501 100644 --- a/source/menu/menu_wbfs.cpp +++ b/source/menu/menu_wbfs.cpp @@ -319,7 +319,7 @@ bool CMenu::_wbfsOp(CMenu::WBFS_OP op) out = true; break; } - if (Disc_Open() < 0) + if (Disc_Open(true) < 0) { error(_t("wbfsoperr2", L"Disc_Open failed")); out = true;