Skip to content

Commit

Permalink
hb: Support Gen/MD ROMs with .md extension
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed Mar 7, 2024
1 parent e1527d7 commit 03143d0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions hb/arm9/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 03143d0

Please sign in to comment.