From 03143d02b09c478302169279f820346ab94bc884 Mon Sep 17 00:00:00 2001 From: RocketRobz Date: Wed, 6 Mar 2024 22:37:49 -0700 Subject: [PATCH] hb: Support Gen/MD ROMs with `.md` extension --- hb/arm9/source/main.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hb/arm9/source/main.cpp b/hb/arm9/source/main.cpp index ef199e9b8..513f16a31 100644 --- a/hb/arm9/source/main.cpp +++ b/hb/arm9/source/main.cpp @@ -119,13 +119,15 @@ void runFile(string filename, string fullPath, string homebrewArg, string ramDis int romFileType = -1; bool romIsCompressed = false; - if (strcasecmp (ramDiskFilename.c_str() + ramDiskFilename.size() - 4, ".gen") == 0) + if ((strcasecmp (ramDiskFilename.c_str() + ramDiskFilename.size() - 4, ".gen") == 0) + || (strcasecmp (ramDiskFilename.c_str() + ramDiskFilename.size() - 4, ".md") == 0)) { romFileType = 0; - romIsCompressed = (strcasecmp (ramDiskFilename.c_str() + ramDiskFilename.size() - 9, ".lz77.gen") == 0); + romIsCompressed = ((strcasecmp (ramDiskFilename.c_str() + ramDiskFilename.size() - 9, ".lz77.gen") == 0) + || (strcasecmp (ramDiskFilename.c_str() + ramDiskFilename.size() - 9, ".lz77.md") == 0)); } else if ((strcasecmp (ramDiskFilename.c_str() + ramDiskFilename.size() - 4, ".smc") == 0) - || (strcasecmp (ramDiskFilename.c_str() + ramDiskFilename.size() - 4, ".sfc") == 0)) + || (strcasecmp (ramDiskFilename.c_str() + ramDiskFilename.size() - 4, ".sfc") == 0)) { romFileType = 1; romIsCompressed = ((strcasecmp (ramDiskFilename.c_str() + ramDiskFilename.size() - 9, ".lz77.smc") == 0)