From 4c526bfb8c93a67912e7ec6fdbe9ab20e92dc5e8 Mon Sep 17 00:00:00 2001 From: Extrems Date: Thu, 28 Nov 2019 18:00:52 -0500 Subject: [PATCH] - Show true streaming audio status. --- cube/swiss/source/swiss.c | 38 +++++++++++++++----------------------- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/cube/swiss/source/swiss.c b/cube/swiss/source/swiss.c index 26e284b0..508c8336 100644 --- a/cube/swiss/source/swiss.c +++ b/cube/swiss/source/swiss.c @@ -600,7 +600,7 @@ ExecutableFile* select_alt_dol(ExecutableFile *filesToPatch) { } -unsigned int load_app(int multiDol, ExecutableFile *filesToPatch, int noASRequired) +unsigned int load_app(int multiDol, ExecutableFile *filesToPatch) { char* gameID = (char*)0x80000000; int i = 0; @@ -616,10 +616,6 @@ unsigned int load_app(int multiDol, ExecutableFile *filesToPatch, int noASRequir DrawPublish(DrawMessageBox(D_FAIL, "Game Header Failed to read")); while(1); } - // Disable Audio streaming if there aren't any .ADP files in the FST. - if(noASRequired) { - GCMDisk.AudioStreaming = 0; - } // Prompt for DOL selection if multi-dol ExecutableFile* altDol = NULL; @@ -1386,6 +1382,19 @@ void load_game() { return; } + // Check that Audio streaming is really necessary before we patch anything for it + if(GCMDisk.AudioStreaming) { + print_gecko("Checking game for 32K files\r\n"); + int numAdpFiles = parse_gcm_for_ext(&curFile, NULL, true); + if(!numAdpFiles) { + print_gecko("No 32K files detected in FST, disabling AudioStreaming flag\r\n"); + GCMDisk.AudioStreaming = 0; + } + else { + print_gecko("Found %i 32K files\r\n", numAdpFiles); + } + } + DrawDispose(msgBox); // Show game info or return to the menu if(!info_game()) { @@ -1407,26 +1416,9 @@ void load_game() { } int multiDol = 0; - int noASRequired = 0; ExecutableFile *filesToPatch = memalign(32, sizeof(ExecutableFile)*512); memset(filesToPatch, 0, sizeof(ExecutableFile)*512); - // If a device is capable of redirecting Audio Streaming, check to see if we really need it - if(devices[DEVICE_CUR]->features & FEAT_REPLACES_DVD_FUNCS) { - // Check that Audio streaming is really necessary before we patch anything for it - if(GCMDisk.AudioStreaming) { - print_gecko("Checking game for 32K files\r\n"); - int numAdpFiles = parse_gcm_for_ext(&curFile, NULL, true); - if(!numAdpFiles) { - print_gecko("No 32K files detected in FST, disabling AudioStreaming flag\r\n"); - noASRequired = 1; - GCMDisk.AudioStreaming = 0; - } - else { - print_gecko("Found %i 32K files\r\n", numAdpFiles); - } - } - } // Report to the user the patch status of this GCM/ISO file if(devices[DEVICE_CUR]->features & FEAT_CAN_READ_PATCHES) { multiDol = check_game(filesToPatch); @@ -1482,7 +1474,7 @@ void load_game() { } } - load_app(multiDol, filesToPatch, noASRequired); + load_app(multiDol, filesToPatch); config_unload_current(); }