diff --git a/.gitignore b/.gitignore index 24350756..aabac247 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ usbloader_gx/ /source/svnrev.c /usbloader_gx.zip /wiiload +/output diff --git a/source/SystemMenu/SystemMenuResources.cpp b/source/SystemMenu/SystemMenuResources.cpp index ee6052e8..b64a1be4 100644 --- a/source/SystemMenu/SystemMenuResources.cpp +++ b/source/SystemMenu/SystemMenuResources.cpp @@ -56,9 +56,16 @@ bool SystemMenuResources::Init() // determine resource cid u16 idx = 0xffff; tmd_content *contents = TMD_CONTENTS( p_tmd ); + + // Priiloader moves some system resources that we rely on from index 1 to index 9. + // In doing this it creates a 10th index (9) to contain the moved resources. + // If priiloader is installed, we need to look for content at index 9 instead of index 1. + bool hasVWiiPriiloader = p_tmd->num_contents == 10; + u16 targetIndex = hasVWiiPriiloader ? 9 : 1; + for( u16 i = 0; i < p_tmd->num_contents; i++ ) { - if( contents[ i ].index == 1 ) + if( contents[ i ].index == targetIndex ) { idx = i; break;