Wii: Use generic VFileOpen
Jeffrey Pfau jeffrey@endrift.com
Sat, 20 Jun 2015 03:30:42 -0700
2 files changed,
3 insertions(+),
3 deletions(-)
M
CMakeLists.txt
→
CMakeLists.txt
@@ -182,7 +182,7 @@ file(GLOB OS_SRC ${CMAKE_SOURCE_DIR}/src/platform/posix/*.c)
source_group("POSIX-specific code" FILES ${OS_SRC}) elseif(WII) list(APPEND VFS_SRC ${CMAKE_SOURCE_DIR}/src/util/vfs/vfs-file.c) - add_definitions(-DCOLOR_16_BIT -DCOLOR_5_6_5) + add_definitions(-DCOLOR_16_BIT -DCOLOR_5_6_5 -DUSE_VFS_FILE) file(GLOB OS_SRC ${CMAKE_SOURCE_DIR}/src/platform/wii/wii-*.c) list(APPEND OS_LIB fat ogc) source_group("Wii-specific code" FILES ${OS_SRC})
M
src/platform/wii/main.c
→
src/platform/wii/main.c
@@ -247,7 +247,7 @@ VIDEO_WaitVSync();
} bool GBAWiiLoadGame(const char* path) { - rom = VFileFOpen(path, "rb"); + rom = VFileOpen(path, O_RDONLY); if (!rom) { return false;@@ -256,7 +256,7 @@ if (!GBAIsROM(rom)) {
return false; } - save = VFileFOpen("test.sav", "w+b"); + save = VFileOpen("test.sav", O_RDWR | O_CREAT); GBALoadROM(&gba, rom, save, path);