diff options
author | Ben Bridle <ben@derelict.engineering> | 2024-12-16 16:30:06 +1300 |
---|---|---|
committer | Ben Bridle <ben@derelict.engineering> | 2024-12-16 16:30:06 +1300 |
commit | 3533aced8b3fc4d6c1ec22c35f805ae966d8a7cb (patch) | |
tree | 4f0fa249c121446c49066fb9cc027286300f0e65 /arm9/source/devices/file.h | |
parent | 38c0a4993265c7c945edd672ed1a5804f2c8b572 (diff) | |
download | bedrock-nds-3533aced8b3fc4d6c1ec22c35f805ae966d8a7cb.zip |
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.
Diffstat (limited to 'arm9/source/devices/file.h')
-rw-r--r-- | arm9/source/devices/file.h | 1 |
1 files changed, 1 insertions, 0 deletions
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(); |