Cleanup: Remove CDUtils

This is a cleaning followup for #11456.
This commit is contained in:
MayImilae
2023-01-23 03:04:23 -08:00
parent 41272dc5f1
commit 37859ec1da
8 changed files with 3 additions and 269 deletions

View File

@ -15,7 +15,6 @@
#include <vector>
#include "Common/Align.h"
#include "Common/CDUtils.h"
#include "Common/CommonPaths.h"
#include "Common/CommonTypes.h"
#include "Common/Config/Config.h"
@ -193,10 +192,9 @@ std::unique_ptr<BootParameters> BootParameters::GenerateFromFile(std::vector<std
for (std::string& path : paths)
UnifyPathSeparators(path);
const bool is_drive = Common::IsCDROMDevice(paths.front());
// Check if the file exist, we may have gotten it from a --elf command line
// that gave an incorrect file name
if (!is_drive && !File::Exists(paths.front()))
if (!File::Exists(paths.front()))
{
PanicAlertFmtT("The specified file \"{0}\" does not exist", paths.front());
return {};
@ -235,7 +233,7 @@ std::unique_ptr<BootParameters> BootParameters::GenerateFromFile(std::vector<std
static const std::unordered_set<std::string> disc_image_extensions = {
{".gcm", ".iso", ".tgc", ".wbfs", ".ciso", ".gcz", ".wia", ".rvz", ".nfs", ".dol", ".elf"}};
if (disc_image_extensions.find(extension) != disc_image_extensions.end() || is_drive)
if (disc_image_extensions.find(extension) != disc_image_extensions.end())
{
std::unique_ptr<DiscIO::VolumeDisc> disc = DiscIO::CreateDisc(path);
if (disc)
@ -258,18 +256,7 @@ std::unique_ptr<BootParameters> BootParameters::GenerateFromFile(std::vector<std
std::move(boot_session_data_));
}
if (is_drive)
{
PanicAlertFmtT("Could not read \"{0}\". "
"There is no disc in the drive or it is not a GameCube/Wii backup. "
"Please note that Dolphin cannot play games directly from the original "
"GameCube and Wii discs.",
path);
}
else
{
PanicAlertFmtT("\"{0}\" is an invalid GCM/ISO file, or is not a GC/Wii ISO.", path);
}
PanicAlertFmtT("\"{0}\" is an invalid GCM/ISO file, or is not a GC/Wii ISO.", path);
return {};
}