Add support for browsing TWL Sound.

This commit is contained in:
Steven Smith 2016-04-11 09:25:04 -07:00
parent 167dc5a1a1
commit 61724235a2
4 changed files with 30 additions and 21 deletions

View File

@ -296,7 +296,7 @@ static const char* description_to_string(Result res) {
case 10:
return "Not enough memory for allocation";
case 20:
return "Wrong permissions for unprivilaged load or store";
return "Wrong permissions for unprivileged access";
case 26:
return "Session closed by remote process";
case 47:
@ -343,11 +343,13 @@ static const char* description_to_string(Result res) {
case 630:
return "Archive permission denied";
case 702:
return "Invalid archive path / Inaccessible archive";
return "Invalid path / Inaccessible archive";
case 705:
return "Offset out of bounds";
case 721:
return "Reached file size limit";
case 760:
return "Unsupported operation";
case 761:
return "ExeFS read size mismatch";
default:
@ -584,7 +586,7 @@ void error_display_res(void* data, void (*drawTop)(ui_view* view, void* data, fl
int summary = R_SUMMARY(result);
int module = R_MODULE(result);
int description = R_DESCRIPTION(result);
snprintf(errorData->fullText, 4096, "%s\nResult code: 0x%08lX\nLevel: %s (%d)\nSummary: %s (%d)\nModule: %s (%d)\nDecription: %s (%d)", textBuf, result, level_to_string(result), level, summary_to_string(result), summary, module_to_string(result), module, description_to_string(result), description);
snprintf(errorData->fullText, 4096, "%s\nResult code: 0x%08lX\nLevel: %s (%d)\nSummary: %s (%d)\nModule: %s (%d)\nDesc: %s (%d)", textBuf, result, level_to_string(result), level, summary_to_string(result), summary, module_to_string(result), module, description_to_string(result), description);
ui_push(prompt_create("Error", errorData->fullText, 0xFF000000, false, errorData, NULL, error_draw_top, error_onresponse));
}

View File

@ -8,21 +8,22 @@
#include "section/section.h"
#include "../screen.h"
#define MAINMENU_ITEM_COUNT 12
#define MAINMENU_ITEM_COUNT 13
static u32 mainmenu_item_count = MAINMENU_ITEM_COUNT;
static list_item mainmenu_items[MAINMENU_ITEM_COUNT] = {
{"SD", 0xFF000000, files_open_sd},
{"CTR NAND", 0xFF000000, files_open_ctr_nand},
{"TWL NAND", 0xFF000000, files_open_twl_nand},
{"TWL Photo", 0xFF000000, files_open_twl_photo},
{"Dump NAND", 0xFF000000, dump_nand},
{"Titles", 0xFF000000, titles_open},
{"Pending Titles", 0xFF000000, pendingtitles_open},
{"Tickets", 0xFF000000, tickets_open},
{"Ext Save Data", 0xFF000000, extsavedata_open},
{"System Save Data", 0xFF000000, systemsavedata_open},
{"Network Install to SD", 0xFF000000, networkinstall_open_sd},
{"SD", 0xFF000000, files_open_sd},
{"CTR NAND", 0xFF000000, files_open_ctr_nand},
{"TWL NAND", 0xFF000000, files_open_twl_nand},
{"TWL Photo", 0xFF000000, files_open_twl_photo},
{"TWL Sound", 0xFF000000, files_open_twl_sound},
{"Dump NAND", 0xFF000000, dump_nand},
{"Titles", 0xFF000000, titles_open},
{"Pending Titles", 0xFF000000, pendingtitles_open},
{"Tickets", 0xFF000000, tickets_open},
{"Ext Save Data", 0xFF000000, extsavedata_open},
{"System Save Data", 0xFF000000, systemsavedata_open},
{"Network Install to SD", 0xFF000000, networkinstall_open_sd},
{"Network Install to NAND", 0xFF000000, networkinstall_open_nand},
};

View File

@ -268,16 +268,21 @@ void files_open_sd() {
}
void files_open_ctr_nand() {
FS_Archive sdmcArchive = {ARCHIVE_NAND_CTR_FS, fsMakePath(PATH_EMPTY, "")};
files_open(sdmcArchive);
FS_Archive ctrNandArchive = {ARCHIVE_NAND_CTR_FS, fsMakePath(PATH_EMPTY, "")};
files_open(ctrNandArchive);
}
void files_open_twl_nand() {
FS_Archive sdmcArchive = {ARCHIVE_NAND_TWL_FS, fsMakePath(PATH_EMPTY, "")};
files_open(sdmcArchive);
FS_Archive twlNandArchive = {ARCHIVE_NAND_TWL_FS, fsMakePath(PATH_EMPTY, "")};
files_open(twlNandArchive);
}
void files_open_twl_photo() {
FS_Archive sdmcArchive = {ARCHIVE_TWL_PHOTO, fsMakePath(PATH_EMPTY, "")};
files_open(sdmcArchive);
FS_Archive twlPhotoArchive = {ARCHIVE_TWL_PHOTO, fsMakePath(PATH_EMPTY, "")};
files_open(twlPhotoArchive);
}
void files_open_twl_sound() {
FS_Archive twlSoundArchive = {ARCHIVE_TWL_SOUND, {PATH_EMPTY, 0, ""}};
files_open(twlSoundArchive);
}

View File

@ -9,6 +9,7 @@ void files_open_sd();
void files_open_ctr_nand();
void files_open_twl_nand();
void files_open_twl_photo();
void files_open_twl_sound();
void networkinstall_open(FS_MediaType dest);
void networkinstall_open_sd();
void networkinstall_open_nand();