Skip to content

Commit 501cdeb

Browse files
committed
use atmos version to determine folder name
1 parent 0e79e72 commit 501cdeb

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

source/utils.h

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,19 @@ void debug_log(const char* format, ...) {
6464
}
6565
}
6666

67+
u64 getAtmosVersion() {
68+
splInitialize();
69+
u64 ver = 0;
70+
SplConfigItem SplConfigItem_ExosphereVersion = (SplConfigItem)65000;
71+
splGetConfig(SplConfigItem_ExosphereVersion, &ver);
72+
splExit();
73+
u32 major = (ver >> 32) & 0xFF;
74+
u32 minor = (ver >> 24) & 0xFF;
75+
u32 micro = (ver >> 16) & 0xFF;
76+
ver = (major*10000) + (minor*100) + micro;
77+
return ver;
78+
}
79+
6780
std::string strTolower(std::string string) {
6881
for(int i = 0; string[i] != 0; i++) {
6982
string[i] = tolower(string[i]);
@@ -189,7 +202,10 @@ std::string dataArcPath(cfwName cfw) {
189202
std::string path;
190203
switch(cfw) {
191204
case atmosphere:
192-
path = "sdmc:/atmosphere/contents/01006A800016E000/romfs/data.arc";
205+
if(getAtmosVersion() >= 1000)
206+
path = "sdmc:/atmosphere/contents/01006A800016E000/romfs/data.arc";
207+
else
208+
path = "sdmc:/atmosphere/titles/01006A800016E000/romfs/data.arc";
193209
break;
194210
case sxos:
195211
path = "sdmc:/sxos/titles/01006A800016E000/romfs/data.arc";

0 commit comments

Comments
 (0)