mirror of
https://github.com/HamletDuFromage/aio-switch-updater.git
synced 2024-11-25 02:52:05 +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(){
|
||||
bool res = false;
|
||||
smAtmosphereHasService(&res, (SmServiceName) {"rnx"});
|
||||
if(res)
|
||||
return rnx;
|
||||
smAtmosphereHasService(&res, (SmServiceName) {"tx"});
|
||||
if(res)
|
||||
return sxos;
|
||||
if(R_SUCCEEDED(smAtmosphereHasService(&res, smEncodeName("rnx")))) {
|
||||
if(res)
|
||||
return rnx;
|
||||
smAtmosphereHasService(&res, smEncodeName("tx"));
|
||||
if(res)
|
||||
return sxos;
|
||||
}
|
||||
else { // use old method just in case
|
||||
if(isServiceRunning("rnx")) return rnx;
|
||||
else if(isServiceRunning("tx")) return sxos;
|
||||
}
|
||||
return ams;
|
||||
};
|
Loading…
Reference in a new issue