forked from Mirror/GodMode9
Show file type for mounted game images
This commit is contained in:
parent
cdb9000e6a
commit
2876ebf7ef
14
source/fs.c
14
source/fs.c
@ -1045,11 +1045,15 @@ bool GetRootDirContentsWorker(DirStruct* contents) {
|
||||
if (!DriveType(drvnum[pdrv])) continue; // drive not available
|
||||
memset(entry->path, 0x00, 64);
|
||||
snprintf(entry->path + 0, 4, drvnum[pdrv]);
|
||||
snprintf(entry->path + 4, 32, "[%s] %s", drvnum[pdrv], drvname[pdrv]);
|
||||
if ((GetMountState() == IMG_FAT) && (pdrv == 7)) // FAT image special handling
|
||||
snprintf(entry->path + 4, 32, "[7:] FAT IMAGE");
|
||||
else if ((GetMountState() == IMG_RAMDRV) && (pdrv == 7)) // RAM drive special handling
|
||||
snprintf(entry->path + 4, 32, "[7:] RAMDRIVE");
|
||||
if ((pdrv == 7) && ((GetMountState() == IMG_FAT) || (GetMountState() == IMG_RAMDRV)))
|
||||
snprintf(entry->path + 4, 32, "[%s] %s", drvnum[pdrv], // FAT image / RAM drive special handling
|
||||
(GetMountState() == IMG_FAT) ? "FAT IMAGE" : "RAMDRIVE");
|
||||
else if (pdrv == 10) // Game drive special handling
|
||||
snprintf(entry->path + 4, 32, "[%s] %s %s", drvnum[pdrv],
|
||||
(GetMountState() == GAME_CIA) ? "CIA" :
|
||||
(GetMountState() == GAME_NCSD) ? "NCSD" :
|
||||
(GetMountState() == GAME_NCCH) ? "NCCH" : "UNK", drvname[pdrv]);
|
||||
else snprintf(entry->path + 4, 32, "[%s] %s", drvnum[pdrv], drvname[pdrv]);
|
||||
entry->name = entry->path + 4;
|
||||
entry->size = GetTotalSpace(entry->path);
|
||||
entry->type = T_ROOT;
|
||||
|
Loading…
x
Reference in New Issue
Block a user