mirror of
https://github.com/HamletDuFromage/aio-switch-updater.git
synced 2024-12-01 05:42:02 +00:00
add backup method to detect cfw
This commit is contained in:
parent
b2f662fb00
commit
4a76e4e9bf
1 changed files with 11 additions and 6 deletions
|
@ -22,11 +22,16 @@ Result smAtmosphereHasService(bool *out, SmServiceName name) {
|
||||||
|
|
||||||
CFW getCFW(){
|
CFW getCFW(){
|
||||||
bool res = false;
|
bool res = false;
|
||||||
smAtmosphereHasService(&res, (SmServiceName) {"rnx"});
|
if(R_SUCCEEDED(smAtmosphereHasService(&res, smEncodeName("rnx")))) {
|
||||||
if(res)
|
if(res)
|
||||||
return rnx;
|
return rnx;
|
||||||
smAtmosphereHasService(&res, (SmServiceName) {"tx"});
|
smAtmosphereHasService(&res, smEncodeName("tx"));
|
||||||
if(res)
|
if(res)
|
||||||
return sxos;
|
return sxos;
|
||||||
|
}
|
||||||
|
else { // use old method just in case
|
||||||
|
if(isServiceRunning("rnx")) return rnx;
|
||||||
|
else if(isServiceRunning("tx")) return sxos;
|
||||||
|
}
|
||||||
return ams;
|
return ams;
|
||||||
};
|
};
|
Loading…
Reference in a new issue