From a4593a8f586228ca8738489aa16c56945e3e1350 Mon Sep 17 00:00:00 2001 From: StapleButter Date: Mon, 31 Dec 2018 04:54:17 +0100 Subject: also, detect bad old romlist.bin and warn the user. --- src/libui_sdl/main.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src') diff --git a/src/libui_sdl/main.cpp b/src/libui_sdl/main.cpp index 0999555..368e8d8 100644 --- a/src/libui_sdl/main.cpp +++ b/src/libui_sdl/main.cpp @@ -1717,6 +1717,24 @@ int main(int argc, char** argv) return 0; } + { + FILE* f = melon_fopen_local("romlist.bin", "rb"); + if (f) + { + u32 data; + fread(&data, 4, 1, f); + fclose(f); + + if ((data >> 24) == 0) // old CRC-based list + { + uiMsgBoxError(NULL, + "Your version of romlist.bin is outdated.", + "Save memory type detection will not work correctly.\n\n" + "You should use the latest version of romlist.bin (provided in melonDS release packages)."); + } + } + } + uiMenu* menu; uiMenuItem* menuitem; -- cgit v1.2.3