all repos — mgba @ 2f2e5398719f9d6a78ae84fc241945b46839b01c

mGBA Game Boy Advance Emulator

Wii: Use generic VFileOpen
Jeffrey Pfau jeffrey@endrift.com
Sat, 20 Jun 2015 03:30:42 -0700
commit

2f2e5398719f9d6a78ae84fc241945b46839b01c

parent

52c66de6945adefa72d87cf5c461af4b30fd1d68

2 files changed, 3 insertions(+), 3 deletions(-)

jump to
M CMakeLists.txtCMakeLists.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.csrc/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);