Add errors
and prepare for file menu more and fix that you can't go left right when going up down
This commit is contained in:
@@ -14,7 +14,8 @@ Vector_t /* of type FSEntry_t */ ReadFolder(char *path){
|
||||
}
|
||||
|
||||
while (!f_readdir(&dir, &fno) && fno.fname[0]) {
|
||||
FSEntry_t newEntry = {.isDir = (fno.fattrib & AM_DIR) ? 1 : 0, .name = CpyStr(fno.fname)};
|
||||
FSEntry_t newEntry = {.optionUnion = fno.fattrib, .name = CpyStr(fno.fname)};
|
||||
|
||||
if (!newEntry.isDir){
|
||||
u64 total = fno.fsize;
|
||||
u8 type = 0;
|
||||
@@ -33,5 +34,7 @@ Vector_t /* of type FSEntry_t */ ReadFolder(char *path){
|
||||
vecAddElem(&out, newEntry);
|
||||
}
|
||||
|
||||
f_closedir(&dir);
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
@@ -1,23 +1,6 @@
|
||||
#pragma once
|
||||
#include <utils/types.h>
|
||||
#include "../../utils/vector.h"
|
||||
|
||||
typedef struct {
|
||||
char *name;
|
||||
union {
|
||||
struct {
|
||||
u8 isDir:1;
|
||||
};
|
||||
u8 optionUnion;
|
||||
};
|
||||
union {
|
||||
struct {
|
||||
u16 size:12;
|
||||
u16 showSize:1;
|
||||
u16 sizeDef:3;
|
||||
};
|
||||
u16 sizeUnion;
|
||||
};
|
||||
} FSEntry_t;
|
||||
#include "../fstypes.h"
|
||||
|
||||
Vector_t /* of type FSEntry_t */ ReadFolder(char *path);
|
||||
Reference in New Issue
Block a user