File tree Expand file tree Collapse file tree 3 files changed +28
-7
lines changed
Expand file tree Collapse file tree 3 files changed +28
-7
lines changed Original file line number Diff line number Diff line change 1111
1212bool dump_done = false ;
1313bool exfat = false ;
14- std::string outPath = " sdmc:/ " + getCFW() + " /contents/01006A800016E000/romfs/data.arc " ;
14+ std::string outPath = dataArcPath( getCFW()) ;
1515const int MD5_DIGEST_LENGTH = 16 ;
1616
1717void md5HashFromFile (std::string filename, unsigned char * out)
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ std::list<std::string> modDirList;
4242
4343const char * mods_root = " sdmc:/UltimateModManager/mods/" ;
4444const char * backups_root = " sdmc:/UltimateModManager/backups/" ;
45- std::string arc_path = " sdmc:/ " + getCFW() + " /contents/01006A800016E000/romfs/data.arc " ;
45+ std::string arc_path = dataArcPath( getCFW()) ;
4646
4747int regionIndex = getRegion();
4848
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ const u64 smashTID = 0x01006A800016E000;
1010const char * manager_root = " sdmc:/UltimateModManager/" ;
1111const char * tablePath = " sdmc:/UltimateModManager/compTable.backup" ;
1212bool applicationMode = false ;
13- enum smashRegions{
13+ enum smashRegions {
1414 jp_ja,
1515 us_en,
1616 us_fr,
@@ -171,13 +171,34 @@ bool isServiceRunning(const char *serviceName) {
171171 return running;
172172}
173173
174- std::string getCFW ()
174+ enum cfwName {
175+ atmosphere,
176+ sxos,
177+ ReiNX,
178+ };
179+ cfwName getCFW ()
175180{
176181 if (isServiceRunning (" rnx" ))
177- return " ReiNX" ;
182+ return ReiNX;
178183 if (isServiceRunning (" tx" ))
179- return " sxos" ;
180- return " atmosphere" ;
184+ return sxos;
185+ return atmosphere;
186+ }
187+
188+ std::string dataArcPath (cfwName cfw) {
189+ std::string path;
190+ switch (cfw) {
191+ case atmosphere:
192+ path = " sdmc:/atmosphere/contents/01006A800016E000/romfs/data.arc" ;
193+ break ;
194+ case sxos:
195+ path = " sdmc:/sxos/titles/01006A800016E000/romfs/data.arc" ;
196+ break ;
197+ case ReiNX:
198+ path = " sdmc:/ReiNX/titles/01006A800016E000/romfs/data.arc" ;
199+ break ;
200+ }
201+ return path;
181202}
182203
183204u64 runningTID ()
You can’t perform that action at this time.
0 commit comments