From b6c01f839f1069888fbe2172805ed1965d6626dc Mon Sep 17 00:00:00 2001 From: GaryOderNichts <12049776+GaryOderNichts@users.noreply.github.com> Date: Sun, 31 Jan 2021 23:25:53 +0100 Subject: [PATCH] wiiu: channel path fixes --- src/audio/sampman_oal.cpp | 8 ++++++++ src/core/re3.cpp | 8 ++++++++ src/skel/wiiu/wiiu.cpp | 1 + 3 files changed, 17 insertions(+) diff --git a/src/audio/sampman_oal.cpp b/src/audio/sampman_oal.cpp index 1c17b960..8a500739 100644 --- a/src/audio/sampman_oal.cpp +++ b/src/audio/sampman_oal.cpp @@ -984,7 +984,11 @@ cSampleManager::Initialise(void) add_providers(); #ifdef AUDIO_CACHE +#ifdef WIIU_CHANNEL + FILE *cacheFile = fcaseopen("/vol/external01/wiiu/apps/re3/audio/sound.cache", "rb"); +#else FILE *cacheFile = fcaseopen("audio\\sound.cache", "rb"); +#endif if (cacheFile) { debug("Loadind audio cache (If game crashes around here, then your cache is corrupted, remove audio/sound.cache)\n"); fread(nStreamLength, sizeof(uint32), TOTAL_STREAMED_SOUNDS, cacheFile); @@ -1007,7 +1011,11 @@ cSampleManager::Initialise(void) USERERROR("Can't open '%s'\n", StreamedNameTable[i]); } #ifdef AUDIO_CACHE +#ifdef WIIU_CHANNEL + cacheFile = fcaseopen("/vol/external01/wiiu/apps/re3/audio/sound.cache", "wb"); +#else cacheFile = fcaseopen("audio\\sound.cache", "wb"); +#endif if(cacheFile) { debug("Saving audio cache\n"); fwrite(nStreamLength, sizeof(uint32), TOTAL_STREAMED_SOUNDS, cacheFile); diff --git a/src/core/re3.cpp b/src/core/re3.cpp index b13db44e..2d04aff9 100644 --- a/src/core/re3.cpp +++ b/src/core/re3.cpp @@ -356,7 +356,11 @@ void SaveINIControllerSettings() bool LoadINISettings() { +#ifdef WIIU_CHANNEL + if (!cfg.load_file("/vol/external01/wiiu/apps/re3/re3.ini")) +#else if (!cfg.load_file("re3.ini")) +#endif return false; #ifdef IMPROVED_VIDEOMODE @@ -514,7 +518,11 @@ void SaveINISettings() } #endif +#ifdef WIIU_CHANNEL + cfg.write_file("/vol/external01/wiiu/apps/re3/re3.ini"); +#else cfg.write_file("re3.ini"); +#endif } #endif diff --git a/src/skel/wiiu/wiiu.cpp b/src/skel/wiiu/wiiu.cpp index 0359b669..3e937e5f 100644 --- a/src/skel/wiiu/wiiu.cpp +++ b/src/skel/wiiu/wiiu.cpp @@ -857,6 +857,7 @@ main(int argc, char *argv[]) _psCreateFolder("/vol/external01/wiiu/apps/re3"); _psCreateFolder("/vol/external01/wiiu/apps/re3/models"); _psCreateFolder("/vol/external01/wiiu/apps/re3/data"); + _psCreateFolder("/vol/external01/wiiu/apps/re3/audio"); // read from content chdir("/vol/content");