Skip to content

Commit b5e2c02

Browse files
committed
Fix channel view on vWii with Priiloader
1 parent e25c4e9 commit b5e2c02

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ usbloader_gx/
1111
/source/svnrev.c
1212
/usbloader_gx.zip
1313
/wiiload
14+
/output

source/SystemMenu/SystemMenuResources.cpp

+8-1
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,16 @@ bool SystemMenuResources::Init()
5656
// determine resource cid
5757
u16 idx = 0xffff;
5858
tmd_content *contents = TMD_CONTENTS( p_tmd );
59+
60+
// Priiloader moves some system resources that we rely on from index 1 to index 9.
61+
// In doing this it creates a 10th index (9) to contain the moved resources.
62+
// If priiloader is installed, we need to look for content at index 9 instead of index 1.
63+
bool hasVWiiPriiloader = p_tmd->num_contents == 10;
64+
u16 targetIndex = hasVWiiPriiloader ? 9 : 1;
65+
5966
for( u16 i = 0; i < p_tmd->num_contents; i++ )
6067
{
61-
if( contents[ i ].index == 1 )
68+
if( contents[ i ].index == targetIndex )
6269
{
6370
idx = i;
6471
break;

0 commit comments

Comments
 (0)