Common: Add a helper function to generate a 8.3 filename from a long one.

Core: Fix the SDMC Directory implementation to make blargSnes work.
This commit is contained in:
Emmanuel Gil Peyrot
2014-09-29 08:34:37 +00:00
parent 19c2a96ab0
commit fbd72fd6bf
5 changed files with 80 additions and 29 deletions

View File

@ -19,9 +19,9 @@ namespace FileSys {
const size_t FILENAME_LENGTH = 0x20C / 2;
struct Entry {
char16_t filename[FILENAME_LENGTH]; // Entry name (UTF-16, null-terminated)
char short_name[9]; // 8.3 file name ('longfilename' -> 'LONGFI~1', null-terminated)
std::array<char, 9> short_name; // 8.3 file name ('longfilename' -> 'LONGFI~1', null-terminated)
char unknown1; // unknown (observed values: 0x0A, 0x70, 0xFD)
char extension[4]; // 8.3 file extension (set to spaces for directories, null-terminated)
std::array<char, 4> extension; // 8.3 file extension (set to spaces for directories, null-terminated)
char unknown2; // unknown (always 0x01)
char unknown3; // unknown (0x00 or 0x08)
char is_directory; // directory flag