Commit 94327e9b authored by Libretro-Admin's avatar Libretro-Admin
Browse files

Avoid having to do CRC file calculation twice

parent 726f5ad6
Pipeline #30017 passed with stages
in 8 minutes and 13 seconds
......@@ -231,13 +231,13 @@ static bool load_bios(const char *biosname)
return true;
}
static bool load_cart(const char *file)
static bool load_cart(const char *file, unsigned long crc_file)
{
FILE *fn;
long l;
int i, nb;
app_data.crc = crc32_file(file);
app_data.crc = crc_file;
if (app_data.crc == 0xAFB23F89)
app_data.exrom = 1; /* Musician */
if (app_data.crc == 0x3BFEF56B)
......@@ -1027,18 +1027,18 @@ bool retro_load_game(const struct retro_game_info *info)
init_audio();
app_data.crc = crc32_file(full_path);
crcx = crc32_file(full_path);
app_data.crc = crcx;
//suck_bios();
o2flag = 1;
crcx = app_data.crc;
//suck_roms();
if (!load_bios(bios_file_path))
return false;
if (!load_cart(full_path))
if (!load_cart(full_path, crcx))
return false;
#ifdef HAVE_VOICE
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment