mirror of
https://github.com/libretro/mgba.git
synced 2024-11-24 08:30:30 +00:00
3DS: Use newlib fs functions unless told otherwise
This commit is contained in:
parent
85298a0a54
commit
fb82257d03
@ -176,6 +176,12 @@ elseif(3DS)
|
||||
include_directories(${CMAKE_BINARY_DIR})
|
||||
list(APPEND OS_LIB sf2d ctru)
|
||||
file(GLOB OS_SRC ${CMAKE_SOURCE_DIR}/src/platform/3ds/*.c ${CMAKE_BINARY_DIR}/font.c)
|
||||
if(USE_VFS_3DS)
|
||||
add_definitions(-DUSE_VFS_3DS)
|
||||
else()
|
||||
add_definitions(-DUSE_VFS_FILE)
|
||||
list(APPEND VFS_SRC ${CMAKE_SOURCE_DIR}/src/util/vfs/vfs-file.c ${CMAKE_SOURCE_DIR}/src/util/vfs/vfs-dirent.c)
|
||||
endif()
|
||||
source_group("3DS-specific code" FILES ${OS_SRC})
|
||||
endif()
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
#include "3ds-vfs.h"
|
||||
|
||||
#ifdef USE_VFS_3DS
|
||||
#include "util/memory.h"
|
||||
#include "util/string.h"
|
||||
|
||||
@ -244,3 +245,4 @@ static const char* _vd3deName(struct VDirEntry* vde) {
|
||||
}
|
||||
return vd3de->utf8Name;
|
||||
}
|
||||
#endif
|
||||
|
@ -64,6 +64,7 @@ int main() {
|
||||
aptInit();
|
||||
hidInit(0);
|
||||
fsInit();
|
||||
sdmcInit();
|
||||
|
||||
sf2d_init();
|
||||
sf2d_set_clear_color(0);
|
||||
@ -139,6 +140,7 @@ cleanup:
|
||||
sf2d_free_texture(tex);
|
||||
sf2d_fini();
|
||||
|
||||
sdmcExit();
|
||||
fsExit();
|
||||
gfxExit();
|
||||
hidExit();
|
||||
|
@ -34,7 +34,7 @@ struct VFile* VFileOpen(const char* path, int flags) {
|
||||
break;
|
||||
}
|
||||
return VFileFOpen(path, chflags);
|
||||
#elif defined(_3DS)
|
||||
#elif defined(USE_VFS_3DS)
|
||||
int ctrFlags = FS_OPEN_READ;
|
||||
switch (flags & O_ACCMODE) {
|
||||
case O_WRONLY:
|
||||
|
Loading…
Reference in New Issue
Block a user