bool init_rom_file(enum rarch_game_type type) { #ifdef HAVE_ZLIB if (*g_extern.fullpath && !g_extern.system.block_extract) { const char *ext = path_get_extension(g_extern.fullpath); if (ext && !strcasecmp(ext, "zip")) { g_extern.rom_file_temporary = true; if (!zlib_extract_first_rom(g_extern.fullpath, sizeof(g_extern.fullpath), g_extern.system.valid_extensions)) { RARCH_ERR("Failed to extract ROM from zipped file: %s.\n", g_extern.fullpath); g_extern.rom_file_temporary = false; return false; } strlcpy(g_extern.last_rom, g_extern.fullpath, sizeof(g_extern.last_rom)); } } #endif switch (type) { case RARCH_CART_SGB: if (!load_sgb_rom()) return false; break; case RARCH_CART_NORMAL: if (!load_normal_rom()) return false; break; case RARCH_CART_BSX: if (!load_bsx_rom(false)) return false; break; case RARCH_CART_BSX_SLOTTED: if (!load_bsx_rom(true)) return false; break; case RARCH_CART_SUFAMI: if (!load_sufami_rom()) return false; break; default: RARCH_ERR("Invalid ROM type.\n"); return false; } return true; }
bool init_rom_file(enum rarch_game_type type) { switch (type) { case RARCH_CART_SGB: if (!load_sgb_rom()) return false; break; case RARCH_CART_NORMAL: if (!load_normal_rom()) return false; break; case RARCH_CART_BSX: if (!load_bsx_rom(false)) return false; break; case RARCH_CART_BSX_SLOTTED: if (!load_bsx_rom(true)) return false; break; case RARCH_CART_SUFAMI: if (!load_sufami_rom()) return false; break; default: RARCH_ERR("Invalid ROM type.\n"); return false; } return true; }