From 3533aced8b3fc4d6c1ec22c35f805ae966d8a7cb Mon Sep 17 00:00:00 2001 From: Ben Bridle Date: Mon, 16 Dec 2024 16:30:06 +1300 Subject: Hide the . and .. directories in file device The file device shows the special directories . and .. in every directory but the root directory. To hide these, in non-root directories, we reduce the reported number of child entries by 2, and when selecting a child entry we increment the pointer by 2. --- arm9/source/devices/file.h | 1 + 1 file changed, 1 insertion(+) (limited to 'arm9/source/devices/file.h') diff --git a/arm9/source/devices/file.h b/arm9/source/devices/file.h index 86ca039..efff684 100644 --- a/arm9/source/devices/file.h +++ b/arm9/source/devices/file.h @@ -29,6 +29,7 @@ FILE *tmpfile; // to open file and keep existing file open struct dirent *child; // currently-selected directory child information u32 dir_i; // index of next child to read from dir + bool at_root; // current entry is the root directory } FileDevice; void init_filesystem(); -- cgit v1.2.3-70-g09d2