naomi: crash on exit when M4 cart fails to load
avoid loading AW cart on Naomi and the other way around
This commit is contained in:
parent
9178206c95
commit
f1cea640e2
|
@ -62,7 +62,7 @@ private:
|
|||
static const u8 k_sboxes[4][16];
|
||||
|
||||
u16 m4id;
|
||||
u8 *m_key_data; // 2048 bytes
|
||||
u8 *m_key_data = NULL; // 2048 bytes
|
||||
u16 subkey1, subkey2;
|
||||
u16 one_round[0x10000];
|
||||
|
||||
|
|
|
@ -164,7 +164,19 @@ static bool naomi_cart_LoadZip(char *filename)
|
|||
}
|
||||
|
||||
struct Game *game = &Games[gameid];
|
||||
|
||||
#if DC_PLATFORM == DC_PLATFORM_NAOMI
|
||||
if (game->cart_type == AW)
|
||||
{
|
||||
msgboxf("Atomiswave cartridges are not supported by NAOMI", 0);
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
if (game->cart_type != AW)
|
||||
{
|
||||
msgboxf("NAOMI cartridges are not supported by Atomiswave", 0);
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
Archive *archive = OpenArchive(filename);
|
||||
if (archive != NULL)
|
||||
printf("Opened %s\n", filename);
|
||||
|
|
Loading…
Reference in New Issue