From c471e61aff8c9e9d9cba2d9d213197b283835a8e Mon Sep 17 00:00:00 2001 From: Pablo Curiel Date: Tue, 10 Nov 2020 00:30:43 -0400 Subject: [PATCH] AMS 0.15.0 fix + ability to go back from the ID offset selection screen. I won't even bother to bump the version number. --- source/nca.c | 2 +- source/util.c | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/source/nca.c b/source/nca.c index 59774e4..e9179fe 100644 --- a/source/nca.c +++ b/source/nca.c @@ -321,7 +321,7 @@ bool readNcaDataByContentId(NcmContentStorage *ncmStorage, const NcmContentId *n { // Retrieve NCA data using raw IStorage reads // Fixes NCA access problems with gamecards under low HOS versions when using ncmContentStorageReadContentIdFile() - success = readFileFromSecureHfs0PartitionByName(strchr(nca_path, '/') + 1, offset, outBuf, bufSize); + success = readFileFromSecureHfs0PartitionByName(strrchr(nca_path, '/') + 1, offset, outBuf, bufSize); if (!success) breaks++; } else { // Retrieve NCA data normally diff --git a/source/util.c b/source/util.c index d749525..c8c12d1 100644 --- a/source/util.c +++ b/source/util.c @@ -2482,7 +2482,7 @@ bool listDesiredNcaType(NcmContentInfo *titleContentInfos, u32 titleContentInfoC // Display a selection list breaks++; - uiDrawString(STRING_X_POS, STRING_Y_POS(breaks), FONT_COLOR_RGB, "Select one of the available %s NCAs from the list below:", getContentType(type)); + uiDrawString(STRING_X_POS, STRING_Y_POS(breaks), FONT_COLOR_RGB, "Select one of the available %s NCAs from the list below. Press B to go back.", getContentType(type)); breaks += 2; while(true) @@ -2546,6 +2546,14 @@ bool listDesiredNcaType(NcmContentInfo *titleContentInfos, u32 titleContentInfoC { if (selectedContent < (cnt - 1)) selectedContent++; } + + if (keysDown & KEY_B) + { + breaks = initial_breaks; + uiFill(0, 8 + (breaks * LINE_HEIGHT), FB_WIDTH, FB_HEIGHT - (8 + (breaks * LINE_HEIGHT)), BG_COLOR_RGB); + uiRefreshDisplay(); + goto out; + } } breaks = initial_breaks;