3ds: 3ds port sources. First set of two

This commit adds changes to the original rockbox sources.

Note: the port files, functions, folders, etc., will be referred
to as 'ctru' to avoid using the Nintendo name elsewhere.

Change-Id: I0e2d3d4d2a75bd45ea67dc3452eb8d5487cf1f5a
This commit is contained in:
Mauricio Garrido 2025-09-29 16:06:04 -06:00 committed by Solomon Peachy
parent 511a38763b
commit a4de1195cd
25 changed files with 227 additions and 23 deletions

View file

@ -305,4 +305,6 @@ keymaps/keymap-echor1.c
keymaps/keymap-surfansf28.c
#elif CONFIG_KEYPAD == RG_NANO_PAD
keymaps/keymap-rgnano.c
#elif CONFIG_KEYPAD == CTRU_PAD
keymaps/keymap-ctru.c
#endif

View file

@ -565,7 +565,11 @@ void resume_directory(const char *dir)
/* Returns the current working directory and also writes cwd to buf if
non-NULL. In case of error, returns NULL. */
#ifdef CTRU
char *__wrap_getcwd(char *buf, getcwd_size_t size)
#else
char *getcwd(char *buf, getcwd_size_t size)
#endif
{
if (!buf)
return tc.currdir;

View file

@ -128,7 +128,12 @@ void tree_unlock_cache(struct tree_context *t);
#else
#define getcwd_size_t size_t
#endif
#ifdef CTRU
/* devkitarm already defines getcwd */
char *__wrap_getcwd(char *buf, getcwd_size_t size);
#else
char *getcwd(char *buf, getcwd_size_t size);
#endif
void reload_directory(void);
bool check_rockboxdir(void);
struct tree_context* tree_get_context(void);