VFS: Rename USE_VFS_* to ENABLE_VFS_*

This commit is contained in:
Vicki Pfau 2024-04-24 22:54:43 -07:00
parent 96702f7db1
commit 88a8f80ebd
4 changed files with 8 additions and 8 deletions

View File

@ -98,7 +98,7 @@ bool VDirCreate(const char* path);
struct VFile* VDirFindFirst(struct VDir* dir, bool (*filter)(struct VFile*));
struct VFile* VDirFindNextAvailable(struct VDir*, const char* basename, const char* infix, const char* suffix, int mode);
#ifdef USE_VFS_FILE
#ifdef ENABLE_VFS_FILE
struct VFile* VFileFOpen(const char* path, const char* mode);
struct VFile* VFileFromFILE(FILE* file);
#endif

View File

@ -5,7 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include <mgba-util/platform/3ds/3ds-vfs.h>
#ifdef USE_VFS_3DS
#ifdef ENABLE_VFS_3DS
#include <mgba-util/memory.h>
#include <mgba-util/string.h>

View File

@ -1,5 +1,5 @@
set(USE_VFS_3DS OFF CACHE BOOL "Use 3DS-specific file support")
mark_as_advanced(USE_VFS_3DS)
set(ENABLE_VFS_3DS OFF CACHE BOOL "Use 3DS-specific file support")
mark_as_advanced(ENABLE_VFS_3DS)
find_program(3DSLINK 3dslink)
find_program(3DSXTOOL 3dsxtool)
@ -28,8 +28,8 @@ set(OS_SRC
set(OS_LIB ${OS_LIB} PARENT_SCOPE)
source_group("3DS-specific code" FILES ${OS_SRC})
if(USE_VFS_3DS)
list(APPEND OS_DEFINES USE_VFS_3DS)
if(ENABLE_VFS_3DS)
list(APPEND OS_DEFINES ENABLE_VFS_3DS)
else()
list(APPEND VFS_SRC ${PROJECT_SOURCE_DIR}/src/util/vfs/vfs-fd.c ${PROJECT_SOURCE_DIR}/src/util/vfs/vfs-dirent.c)
endif()

View File

@ -20,7 +20,7 @@
#ifdef ENABLE_VFS
struct VFile* VFileOpen(const char* path, int flags) {
#ifdef USE_VFS_FILE
#ifdef ENABLE_VFS_FILE
const char* chflags;
switch (flags & O_ACCMODE) {
case O_WRONLY:
@ -68,7 +68,7 @@ struct VFile* VFileOpen(const char* path, int flags) {
sceFlags |= SCE_O_CREAT;
}
return VFileOpenSce(path, sceFlags, 0666);
#elif defined(USE_VFS_3DS)
#elif defined(ENABLE_VFS_3DS)
int ctrFlags = FS_OPEN_READ;
switch (flags & O_ACCMODE) {
case O_WRONLY: