@@ -17,11 +17,13 @@ public class BackgroundImageModFactory : DIModFactoryBase<BackgroundImageMod>
1717 private const string Author = "Joshua \" Yoshi\" Askharoun" ;
1818
1919 public override ModMetadata Metadata => new ( nameof ( BackgroundImageMod ) , "Background Image" ,
20- Description , Author , new ( 1 , 0 ) ) ;
20+ Description , Author , new ( 1 , 1 ) ) ;
2121}
2222
2323public class BackgroundImageMod ( ModMetadata metadata , IModCoreConfig modConfig ) : Mod ( metadata )
2424{
25+ private const string FRAMEBACKGROUND_NAME = "FRAMEBACKGROUND06.PNG" ;
26+
2527 public string ZuneInstallDir => modConfig . ZuneInstallDir ;
2628
2729 public override AbstractUICollection ? GetDefaultOptionsUI ( )
@@ -90,7 +92,7 @@ public class BackgroundImageMod(ModMetadata metadata, IModCoreConfig modConfig)
9092 // Locate the image resource
9193 // TODO: Allow users to specify which background they want to replace
9294 List < Resource > RCDATA = vi . Resources [ resId ] ;
93- int idx = RCDATA . FindIndex ( r => r . Name . Name == "FRAMEBACKGROUND06.PNG" ) ;
95+ int idx = RCDATA . FindIndex ( r => r . Name . Name == FRAMEBACKGROUND_NAME ) ;
9496 if ( idx < 0 )
9597 return $ "Failed to locate background image resource in Zune software.";
9698 GenericResource ogRes = ( GenericResource ) RCDATA [ idx ] ;
@@ -105,6 +107,10 @@ public class BackgroundImageMod(ModMetadata metadata, IModCoreConfig modConfig)
105107 }
106108 File . Copy ( zsrDllTempPath , zsrDllInfo . FullName , true ) ;
107109
110+ // Configure Zune to use the "Zero" background
111+ var resourceUri = $ "res://ZuneShellResources.dll!{ FRAMEBACKGROUND_NAME } ";
112+ RegEdit . CurrentUserSetStringValue ( RegEdit . ZUNE_REG_PATH + "Shell" , "BackgroundImage" , resourceUri ) ;
113+
108114 return null ;
109115 }
110116 catch ( IOException )
0 commit comments