#include "current_cfw.hpp" #include bool isServiceRunning(const char *serviceName) { Handle handle; SmServiceName service_name = smEncodeName(serviceName); bool running = R_FAILED(smRegisterService(&handle, service_name, false, 1)); svcCloseHandle(handle); if (!running) smUnregisterService(service_name); return running; }; CFW getCFW(){ if(isServiceRunning("rnx")) return rnx; else if(isServiceRunning("tx")) return sxos; else return ams; };