diff --git a/Makefile.common b/Makefile.common index 79380e9..892b311 100644 --- a/Makefile.common +++ b/Makefile.common @@ -46,6 +46,10 @@ ifeq ($(TIMER_UNLOCK),1) CFLAGS += -DTIMER_UNLOCK endif +ifeq ($(HIDE_HIDDEN),1) + CFLAGS += -DHIDE_HIDDEN +endif + ifdef FIXED_BRIGHTNESS CFLAGS += -DFIXED_BRIGHTNESS=$(FIXED_BRIGHTNESS) endif diff --git a/arm9/source/filesys/fsdrive.c b/arm9/source/filesys/fsdrive.c index c6c9a42..7fe3881 100644 --- a/arm9/source/filesys/fsdrive.c +++ b/arm9/source/filesys/fsdrive.c @@ -122,6 +122,10 @@ bool GetDirContentsWorker(DirStruct* contents, char* fpath, int fnsize, const ch while (fvx_readdir(&pdir, &fno) == FR_OK) { if ((strncmp(fno.fname, ".", 2) == 0) || (strncmp(fno.fname, "..", 3) == 0)) continue; // filter out virtual entries + #ifdef HIDE_HIDDEN + if (fno.fattrib & AM_HID) + continue; // filter out hidden entries + #endif strncpy(fname, fno.fname, (fnsize - 1) - (fname - fpath)); if (fno.fname[0] == 0) { ret = true;