Skip to content

Commit

Permalink
Merge pull request dolphin-emu#11474 from MayImilae/cleanup-remove-cd…
Browse files Browse the repository at this point in the history
…utils

Cleanup: Remove CDUtils
  • Loading branch information
delroth authored Jan 29, 2023
2 parents 05b7792 + 37859ec commit 2eda76c
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 269 deletions.
230 changes: 0 additions & 230 deletions Source/Core/Common/CDUtils.cpp

This file was deleted.

16 changes: 0 additions & 16 deletions Source/Core/Common/CDUtils.h

This file was deleted.

2 changes: 0 additions & 2 deletions Source/Core/Common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ add_library(common
BitSet.h
BitUtils.h
BlockingLoop.h
CDUtils.cpp
CDUtils.h
ChunkFile.h
CodeBlock.h
ColorUtil.cpp
Expand Down
19 changes: 3 additions & 16 deletions Source/Core/Core/Boot/Boot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 {};
Expand Down Expand Up @@ -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)
Expand All @@ -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 {};
}

Expand Down
1 change: 0 additions & 1 deletion Source/Core/Core/ConfigManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "AudioCommon/AudioCommon.h"

#include "Common/Assert.h"
#include "Common/CDUtils.h"
#include "Common/CommonPaths.h"
#include "Common/CommonTypes.h"
#include "Common/Config/Config.h"
Expand Down
1 change: 0 additions & 1 deletion Source/Core/DiscIO/Blob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <string>
#include <utility>

#include "Common/CDUtils.h"
#include "Common/CommonTypes.h"
#include "Common/IOFile.h"
#include "Common/MsgHandler.h"
Expand Down
2 changes: 0 additions & 2 deletions Source/Core/DolphinLib.props
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
<ClInclude Include="Common\BitSet.h" />
<ClInclude Include="Common\BitUtils.h" />
<ClInclude Include="Common\BlockingLoop.h" />
<ClInclude Include="Common\CDUtils.h" />
<ClInclude Include="Common\ChunkFile.h" />
<ClInclude Include="Common\CodeBlock.h" />
<ClInclude Include="Common\ColorUtil.h" />
Expand Down Expand Up @@ -724,7 +723,6 @@
<ClCompile Include="AudioCommon\WASAPIStream.cpp" />
<ClCompile Include="AudioCommon\WaveFile.cpp" />
<ClCompile Include="Common\Analytics.cpp" />
<ClCompile Include="Common\CDUtils.cpp" />
<ClCompile Include="Common\ColorUtil.cpp" />
<ClCompile Include="Common\CommonFuncs.cpp" />
<ClCompile Include="Common\CompatPatches.cpp" />
Expand Down
1 change: 0 additions & 1 deletion Source/Core/DolphinQt/MenuBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "Common/FileUtil.h"
#include "Common/StringUtil.h"

#include "Common/CDUtils.h"
#include "Core/Boot/Boot.h"
#include "Core/CommonTitles.h"
#include "Core/Config/MainSettings.h"
Expand Down

0 comments on commit 2eda76c

Please sign in to comment.