Skip to content

Commit

Permalink
use atmos version to determine folder name
Browse files Browse the repository at this point in the history
  • Loading branch information
Genwald committed Dec 9, 2019
1 parent 0e79e72 commit 501cdeb
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion source/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,19 @@ void debug_log(const char* format, ...) {
}
}

u64 getAtmosVersion() {
splInitialize();
u64 ver = 0;
SplConfigItem SplConfigItem_ExosphereVersion = (SplConfigItem)65000;
splGetConfig(SplConfigItem_ExosphereVersion, &ver);
splExit();
u32 major = (ver >> 32) & 0xFF;
u32 minor = (ver >> 24) & 0xFF;
u32 micro = (ver >> 16) & 0xFF;
ver = (major*10000) + (minor*100) + micro;
return ver;
}

std::string strTolower(std::string string) {
for(int i = 0; string[i] != 0; i++) {
string[i] = tolower(string[i]);
Expand Down Expand Up @@ -189,7 +202,10 @@ std::string dataArcPath(cfwName cfw) {
std::string path;
switch(cfw) {
case atmosphere:
path = "sdmc:/atmosphere/contents/01006A800016E000/romfs/data.arc";
if(getAtmosVersion() >= 1000)
path = "sdmc:/atmosphere/contents/01006A800016E000/romfs/data.arc";
else
path = "sdmc:/atmosphere/titles/01006A800016E000/romfs/data.arc";
break;
case sxos:
path = "sdmc:/sxos/titles/01006A800016E000/romfs/data.arc";
Expand Down

0 comments on commit 501cdeb

Please sign in to comment.