diff --git a/libctru/include/3ds/services/fs.h b/libctru/include/3ds/services/fs.h index 073f3b6..e5f573d 100644 --- a/libctru/include/3ds/services/fs.h +++ b/libctru/include/3ds/services/fs.h @@ -1,5 +1,4 @@ #pragma once -#include #include <3ds/types.h> /*! @file FS.h @@ -128,25 +127,11 @@ typedef struct u64 fileSize; //!< file size } FS_dirent; -/*! Create an FS_path from a type and data pointer. - * - * @param[in] type Path type. - * @param[in] path Pointer to path data. - * - * @returns FS_path - * - * @sa FS_pathType - */ -static inline FS_path -FS_makePath(FS_pathType type, - const char *path) -{ - return (FS_path){type, strlen(path)+1, (const u8*)path}; -} - Result fsInit(void); Result fsExit(void); +FS_path FS_makePath(FS_pathType type, const char *path); + Result FSUSER_Initialize(Handle* handle); Result FSUSER_OpenArchive(Handle* handle, FS_archive* archive); Result FSUSER_OpenDirectory(Handle* handle, Handle* out, FS_archive archive, FS_path dirLowPath); diff --git a/libctru/include/3ds/types.h b/libctru/include/3ds/types.h index b844bcb..2f7d01a 100644 --- a/libctru/include/3ds/types.h +++ b/libctru/include/3ds/types.h @@ -4,7 +4,6 @@ #pragma once -#include #include #include #include diff --git a/libctru/source/allocator/linear.cpp b/libctru/source/allocator/linear.cpp index e5e6b85..b0a4b27 100644 --- a/libctru/source/allocator/linear.cpp +++ b/libctru/source/allocator/linear.cpp @@ -1,5 +1,6 @@ #include <3ds.h> #include <3ds/util/rbtree.h> + #include "mem_pool.h" extern u32 __linear_heap, __linear_heap_size; diff --git a/libctru/source/allocator/mem_pool.h b/libctru/source/allocator/mem_pool.h index b75d195..97ca60b 100644 --- a/libctru/source/allocator/mem_pool.h +++ b/libctru/source/allocator/mem_pool.h @@ -1,5 +1,6 @@ #pragma once #include <3ds.h> +#include struct MemChunk { diff --git a/libctru/source/sdmc_dev.c b/libctru/source/sdmc_dev.c index 11b498c..3d9e269 100644 --- a/libctru/source/sdmc_dev.c +++ b/libctru/source/sdmc_dev.c @@ -2,6 +2,7 @@ #include #include #include +#include #include <3ds.h> /*! @internal diff --git a/libctru/source/services/fs.c b/libctru/source/services/fs.c index 51af7b5..2ff991d 100644 --- a/libctru/source/services/fs.c +++ b/libctru/source/services/fs.c @@ -14,6 +14,22 @@ static Handle fsuHandle; // used to determine whether or not we should do FSUSER_Initialize on fsuHandle Handle __get_handle_from_list(char* name); +/*! Create an FS_path from a type and data pointer. + * + * @param[in] type Path type. + * @param[in] path Pointer to path data. + * + * @returns FS_path + * + * @sa FS_pathType + */ +FS_path +FS_makePath(FS_pathType type, + const char *path) +{ + return (FS_path){type, strlen(path)+1, (const u8*)path}; +} + /*! Initialize FS service * * @returns error diff --git a/libctru/source/services/httpc.c b/libctru/source/services/httpc.c index 5b4b949..00cb8a7 100644 --- a/libctru/source/services/httpc.c +++ b/libctru/source/services/httpc.c @@ -1,3 +1,4 @@ +#include #include <3ds.h> Handle __httpc_servhandle = 0; diff --git a/libctru/source/services/pm.c b/libctru/source/services/pm.c index 185b37d..6c74ed2 100644 --- a/libctru/source/services/pm.c +++ b/libctru/source/services/pm.c @@ -1,4 +1,5 @@ #include +#include #include <3ds.h> static Handle pmHandle; diff --git a/libctru/source/services/soc/soc_common.h b/libctru/source/services/soc/soc_common.h index 004235d..f5cfe96 100644 --- a/libctru/source/services/soc/soc_common.h +++ b/libctru/source/services/soc/soc_common.h @@ -1,5 +1,6 @@ #pragma once +#include #include <3ds.h> extern Handle SOCU_handle;