diff --git a/include/arm9/config.h b/include/arm9/config.h index d3f9548..b6871b2 100644 --- a/include/arm9/config.h +++ b/include/arm9/config.h @@ -4,6 +4,9 @@ KBootOption1 = 0, KBootOption2, KBootOption3, + KBootOption1NandImage, + KBootOption2NandImage, + KBootOption3NandImage, KBootOption1Buttons, KBootOption2Buttons, KBootOption3Buttons, diff --git a/source/arm9/config_parser.c b/source/arm9/config_parser.c index 8e22c76..8613287 100644 --- a/source/arm9/config_parser.c +++ b/source/arm9/config_parser.c @@ -44,6 +44,9 @@ "BOOT_OPTION1", "BOOT_OPTION2", "BOOT_OPTION3", + "BOOT_OPTION1_NAND_IMAGE", + "BOOT_OPTION2_NAND_IMAGE", + "BOOT_OPTION3_NAND_IMAGE", "BOOT_OPTION1_BUTTONS", "BOOT_OPTION2_BUTTONS", "BOOT_OPTION3_BUTTONS", @@ -54,6 +57,9 @@ { parseBootOption, NULL }, { parseBootOption, NULL }, { parseBootOption, NULL }, + { parseBootOption, NULL }, + { parseBootOption, NULL }, + { parseBootOption, NULL }, { parseBootOptionPad, NULL }, { parseBootOptionPad, NULL }, { parseBootOptionPad, NULL }, @@ -229,6 +235,10 @@ // no dir-return if(c == '.' && path[1] == '.') return false; + + // no space after dir slash + if((c == '\\' || c == '/') && path[1] == ' ') + return false; // no non ASCII chars if(!isascii(c)) diff --git a/source/arm9/filebrowse.c b/source/arm9/filebrowse.c index 29c8ab9..8235831 100644 --- a/source/arm9/filebrowse.c +++ b/source/arm9/filebrowse.c @@ -115,11 +115,10 @@ static void updateCursor(u32 cursor_pos, u32 old_cursor_pos, u32 maxEntries) { // clear old '*' char - consoleSelect(&con_bottom); - consoleSetCursor(&con_bottom, 0, (old_cursor_pos % (maxEntries + 1)) + 1); + consoleSetCursor(&con_bottom, 0, (old_cursor_pos % (maxEntries)) + 1); printf(" "); - consoleSetCursor(&con_bottom, 0, (cursor_pos % (maxEntries + 1)) + 1); + consoleSetCursor(&con_bottom, 0, (cursor_pos % (maxEntries)) + 1); printf("*"); } @@ -131,7 +130,9 @@ static u32 old_cursor_pos; - if((cursor_pos == 0 || (cursor_pos % maxEntries)) && !dirChange && (cursor_pos <= maxEntries)) + consoleSelect(&con_bottom); + + if(!dirChange && (cursor_pos < maxEntries) && (old_cursor_pos < maxEntries)) { updateCursor(cursor_pos, old_cursor_pos, maxEntries); old_cursor_pos = cursor_pos; @@ -144,8 +145,7 @@ char entry [maxLen]; // should be safe unsigned start, end; - clearConsoles(); - consoleSelect(&con_bottom); + consoleClear(); // print the current path in the first line formatEntry(entry, curPath, (u32) maxLen - 3, false);