Simplify fsdrive code

This commit is contained in:
d0k3 2019-10-21 21:48:53 +02:00 committed by Wolfvak
parent f184ad5701
commit 1889f4fd57
2 changed files with 2 additions and 3 deletions

View File

@ -91,7 +91,7 @@ bool GetRootDirContentsWorker(DirStruct* contents) {
GetVCartTypeString(carttype); GetVCartTypeString(carttype);
// virtual root objects hacked in // virtual root objects hacked in
for (u32 i = 0; (i < NORM_FS+VIRT_FS) && (n_entries < MAX_DIR_ENTRIES); i++) { for (u32 i = 0; (i < countof(drvnum)) && (n_entries < MAX_DIR_ENTRIES); i++) {
DirEntry* entry = &(contents->entry[n_entries]); DirEntry* entry = &(contents->entry[n_entries]);
if (!DriveType(drvnum[i])) continue; // drive not available if (!DriveType(drvnum[i])) continue; // drive not available
entry->p_name = 4; entry->p_name = 4;

View File

@ -4,8 +4,7 @@
#include "fsdir.h" #include "fsdir.h"
#define NORM_FS 10 #define NORM_FS 10
#define IMGN_FS 3 // image normal filesystems #define IMGN_FS 3 // image normal filesystems
#define VIRT_FS 13
// primary drive types // primary drive types
#define DRV_UNKNOWN (0<<0) #define DRV_UNKNOWN (0<<0)