diff --git a/CMakeLists.txt b/CMakeLists.txt index e64adad3b..9ad74d8f6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -182,7 +182,7 @@ elseif(UNIX) 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}) diff --git a/src/platform/wii/main.c b/src/platform/wii/main.c index 0e660d26a..88184049e 100644 --- a/src/platform/wii/main.c +++ b/src/platform/wii/main.c @@ -247,7 +247,7 @@ static void GBAWiiFrame(void) { } bool GBAWiiLoadGame(const char* path) { - rom = VFileFOpen(path, "rb"); + rom = VFileOpen(path, O_RDONLY); if (!rom) { return false; @@ -256,7 +256,7 @@ bool GBAWiiLoadGame(const char* path) { return false; } - save = VFileFOpen("test.sav", "w+b"); + save = VFileOpen("test.sav", O_RDWR | O_CREAT); GBALoadROM(&gba, rom, save, path);