From a1d1e01e11185d389f9448be0be0a567f1430600 Mon Sep 17 00:00:00 2001 From: Nebuleon Fumika Date: Sat, 15 Jun 2013 23:40:29 -0400 Subject: Dynamically allocate memory for the file selector to store the name pointers into. Also dramatically simplify the file selector's name management code. This has many effects: * It allows the file selector to handle directories of more than 511 files and a parent directory entry. (Fixes GitHub issue #37). * It allows the file selector to sort directories along with files, which is a more common use case (game folders that contain ROM hacks, plus single game files, are sorted by name as the user expects). * The file selector now reports progress while loading a large directory. * The screenshot slideshow function now shows an existing dedicated message, "No screenshots found", instead of crashing when the screenshot directory contains no screenshots. Add Quicksort code from GameYob. See . * Faster sorting in the common case where a directory's natural order is already sorted, using the isSorted function. * Use the median-of-three algorithm first described by Robert Sedgewick to select the pivot. Causes less recursion in many cases. * Associates file names with their is-directory flag, keeping both in sync. --- source/nds/message.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/nds/message.h') diff --git a/source/nds/message.h b/source/nds/message.h index 98f64ab..f2977e4 100644 --- a/source/nds/message.h +++ b/source/nds/message.h @@ -31,6 +31,10 @@ enum MSG MSG_MAIN_MENU_TOOLS, MSG_MAIN_MENU_OPTIONS, MSG_MAIN_MENU_EXIT, + + MSG_FILE_MENU_LOADING_LIST, + MSG_FILE_MENU_SORTING_LIST, + FMT_VIDEO_AUDIO_FLUIDITY_PREFERENCE, MSG_VIDEO_AUDIO_FLUIDITY_PREFER_VIDEO, MSG_VIDEO_AUDIO_FLUIDITY_PREFER_AUDIO, -- cgit v1.2.3