diff --git a/waterbox/melon/BizPlatform.cpp b/waterbox/melon/BizPlatform.cpp index acc8003e8d..2cb0e309c2 100644 --- a/waterbox/melon/BizPlatform.cpp +++ b/waterbox/melon/BizPlatform.cpp @@ -21,6 +21,50 @@ void StopEmu() { } +int GetConfigInt(ConfigEntry entry) +{ + const int imgsizes[] = {0, 256, 512, 1024, 2048, 4096}; + + switch (entry) + { + case DLDI_ImageSize: return imgsizes[Config::DLDISize]; + + case DSiSD_ImageSize: return imgsizes[Config::DSiSDSize]; + } + + return 0; +} + +bool GetConfigBool(ConfigEntry entry) +{ + switch (entry) + { + case DLDI_Enable: return Config::DLDIEnable != 0; + case DLDI_ReadOnly: return Config::DLDIReadOnly != 0; + case DLDI_FolderSync: return Config::DLDIFolderSync != 0; + + case DSiSD_Enable: return Config::DSiSDEnable != 0; + case DSiSD_ReadOnly: return Config::DSiSDReadOnly != 0; + case DSiSD_FolderSync: return Config::DSiSDFolderSync != 0; + } + + return false; +} + +std::string GetConfigString(ConfigEntry entry) +{ + switch (entry) + { + case DLDI_ImagePath: return Config::DLDISDPath; + case DLDI_FolderPath: return Config::DLDIFolderPath; + + case DSiSD_ImagePath: return Config::DSiSDPath; + case DSiSD_FolderPath: return Config::DSiSDFolderPath; + } + + return ""; +} + FILE* OpenFile(const char* path, const char* mode, bool mustexist) { return fopen(path, mode); diff --git a/waterbox/melon/Makefile b/waterbox/melon/Makefile index 93c26568d4..694c22a5be 100644 --- a/waterbox/melon/Makefile +++ b/waterbox/melon/Makefile @@ -29,6 +29,7 @@ CORE_SRCS = \ DSi_NWifi.cpp \ DSi_SD.cpp \ DSi_SPI_TSC.cpp \ + FATStorage.cpp \ GBACart.cpp \ GPU.cpp \ GPU2D.cpp \ diff --git a/waterbox/melon/melonDS b/waterbox/melon/melonDS index 0f477d8597..608b7d2f36 160000 --- a/waterbox/melon/melonDS +++ b/waterbox/melon/melonDS @@ -1 +1 @@ -Subproject commit 0f477d859726506c77a22e7b4fa56bd95894edf3 +Subproject commit 608b7d2f36c986cfb5a31e9ebf016968015d592f