From 3c9e4e2ebcc2157c4c1c23a0ce3081355714f705 Mon Sep 17 00:00:00 2001 From: yellows8 Date: Thu, 17 Dec 2020 15:01:46 -0500 Subject: [PATCH] ns: Use ns:ro if available. --- nx/source/services/ns.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nx/source/services/ns.c b/nx/source/services/ns.c index 847f0396..8476de48 100644 --- a/nx/source/services/ns.c +++ b/nx/source/services/ns.c @@ -19,12 +19,13 @@ NX_GENERATE_SERVICE_GUARD(ns); Result _nsInitialize(void) { Result rc=0; - static const char* const servarray[5] = {"ns:ec", "ns:web", "ns:rid", "ns:rt", "ns:am2"}; // This is the order used used by official sw, however the below loop uses this in reverse since ns:am2 is last in the list. + static const char* const servarray[6] = {"ns:ec", "ns:web", "ns:rid", "ns:rt", "ns:ro", "ns:am2"}; // This is the order used used by official sw, however the below loop uses this in reverse since ns:am2 is last in the list. if(hosversionBefore(3,0,0)) return smGetService(&g_nsAppManSrv, "ns:am"); - for (s32 i=4; i>=0; i--) { + for (s32 i=5; i>=0; i--) { + if (i==4 && hosversionBefore(11,0,0)) continue; rc = smGetService(&g_nsGetterSrv, servarray[i]); if (R_SUCCEEDED(rc)) break; }