summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorZopolis4 <creatorsmithmdt@gmail.com>2021-07-21 02:18:44 +1000
committerZopolis4 <creatorsmithmdt@gmail.com>2025-04-21 22:05:24 +1000
commit494e2c05c217c6ba80ceecba7c3d7ce339ea55a9 (patch)
tree7735e7d84a15cec844729f7e382fb751a7ed9752 /Source/Core
parentbc3c3eb79ae4d8dc83091d20c686aac2d772590e (diff)
Adding support for detecting .bin images
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/Boot/Boot.cpp3
-rw-r--r--Source/Core/DolphinQt/GameList/GameTracker.cpp14
-rw-r--r--Source/Core/DolphinQt/Info.plist.in1
-rw-r--r--Source/Core/DolphinQt/MainWindow.cpp2
-rw-r--r--Source/Core/DolphinQt/Settings/PathPane.cpp2
-rw-r--r--Source/Core/UICommon/GameFileCache.cpp6
6 files changed, 15 insertions, 13 deletions
diff --git a/Source/Core/Core/Boot/Boot.cpp b/Source/Core/Core/Boot/Boot.cpp
index 1340d19c84..4e08ccfd12 100644
--- a/Source/Core/Core/Boot/Boot.cpp
+++ b/Source/Core/Core/Boot/Boot.cpp
@@ -236,7 +236,8 @@ std::unique_ptr<BootParameters> BootParameters::GenerateFromFile(std::vector<std
#endif
static const std::unordered_set<std::string> disc_image_extensions = {
- {".gcm", ".iso", ".tgc", ".wbfs", ".ciso", ".gcz", ".wia", ".rvz", ".nfs", ".dol", ".elf"}};
+ {".gcm", ".bin", ".iso", ".tgc", ".wbfs", ".ciso", ".gcz", ".wia", ".rvz", ".nfs", ".dol",
+ ".elf"}};
if (disc_image_extensions.contains(extension))
{
std::unique_ptr<DiscIO::VolumeDisc> disc = DiscIO::CreateDisc(path);
diff --git a/Source/Core/DolphinQt/GameList/GameTracker.cpp b/Source/Core/DolphinQt/GameList/GameTracker.cpp
index 9428729997..6031d37a32 100644
--- a/Source/Core/DolphinQt/GameList/GameTracker.cpp
+++ b/Source/Core/DolphinQt/GameList/GameTracker.cpp
@@ -22,13 +22,13 @@
// NOTE: Qt likes to be case-sensitive here even though it shouldn't be thus this ugly regex hack
static const QStringList game_filters{
- QStringLiteral("*.[gG][cC][mM]"), QStringLiteral("*.[iI][sS][oO]"),
- QStringLiteral("*.[tT][gG][cC]"), QStringLiteral("*.[cC][iI][sS][oO]"),
- QStringLiteral("*.[gG][cC][zZ]"), QStringLiteral("*.[wW][bB][fF][sS]"),
- QStringLiteral("*.[wW][iI][aA]"), QStringLiteral("*.[rR][vV][zZ]"),
- QStringLiteral("hif_000000.nfs"), QStringLiteral("*.[wW][aA][dD]"),
- QStringLiteral("*.[eE][lL][fF]"), QStringLiteral("*.[dD][oO][lL]"),
- QStringLiteral("*.[jJ][sS][oO][nN]")};
+ QStringLiteral("*.[gG][cC][mM]"), QStringLiteral("*.[bB][iI][nN]"),
+ QStringLiteral("*.[iI][sS][oO]"), QStringLiteral("*.[tT][gG][cC]"),
+ QStringLiteral("*.[cC][iI][sS][oO]"), QStringLiteral("*.[gG][cC][zZ]"),
+ QStringLiteral("*.[wW][bB][fF][sS]"), QStringLiteral("*.[wW][iI][aA]"),
+ QStringLiteral("*.[rR][vV][zZ]"), QStringLiteral("hif_000000.nfs"),
+ QStringLiteral("*.[wW][aA][dD]"), QStringLiteral("*.[eE][lL][fF]"),
+ QStringLiteral("*.[dD][oO][lL]"), QStringLiteral("*.[jJ][sS][oO][nN]")};
GameTracker::GameTracker(QObject* parent) : QFileSystemWatcher(parent)
{
diff --git a/Source/Core/DolphinQt/Info.plist.in b/Source/Core/DolphinQt/Info.plist.in
index ddd2ed4182..0550533969 100644
--- a/Source/Core/DolphinQt/Info.plist.in
+++ b/Source/Core/DolphinQt/Info.plist.in
@@ -7,6 +7,7 @@
<dict>
<key>CFBundleTypeExtensions</key>
<array>
+ <string>bin</string>
<string>ciso</string>
<string>dol</string>
<string>elf</string>
diff --git a/Source/Core/DolphinQt/MainWindow.cpp b/Source/Core/DolphinQt/MainWindow.cpp
index 93ad16a59e..6cb0a39a06 100644
--- a/Source/Core/DolphinQt/MainWindow.cpp
+++ b/Source/Core/DolphinQt/MainWindow.cpp
@@ -787,7 +787,7 @@ QStringList MainWindow::PromptFileNames()
QStringList paths = DolphinFileDialog::getOpenFileNames(
this, tr("Select a File"),
settings.value(QStringLiteral("mainwindow/lastdir"), QString{}).toString(),
- QStringLiteral("%1 (*.elf *.dol *.gcm *.iso *.tgc *.wbfs *.ciso *.gcz *.wia *.rvz "
+ QStringLiteral("%1 (*.elf *.dol *.gcm *.bin *.iso *.tgc *.wbfs *.ciso *.gcz *.wia *.rvz "
"hif_000000.nfs *.wad *.dff *.m3u *.json);;%2 (*)")
.arg(tr("All GC/Wii files"))
.arg(tr("All Files")));
diff --git a/Source/Core/DolphinQt/Settings/PathPane.cpp b/Source/Core/DolphinQt/Settings/PathPane.cpp
index 8d91e31d50..bcbcbf3248 100644
--- a/Source/Core/DolphinQt/Settings/PathPane.cpp
+++ b/Source/Core/DolphinQt/Settings/PathPane.cpp
@@ -45,7 +45,7 @@ void PathPane::BrowseDefaultGame()
{
QString file = QDir::toNativeSeparators(DolphinFileDialog::getOpenFileName(
this, tr("Select a Game"), Settings::Instance().GetDefaultGame(),
- QStringLiteral("%1 (*.elf *.dol *.gcm *.iso *.tgc *.wbfs *.ciso *.gcz *.wia *.rvz "
+ QStringLiteral("%1 (*.elf *.dol *.gcm *.bin *.iso *.tgc *.wbfs *.ciso *.gcz *.wia *.rvz "
"hif_000000.nfs *.wad *.m3u *.json);;%2 (*)")
.arg(tr("All GC/Wii files"))
.arg(tr("All Files"))));
diff --git a/Source/Core/UICommon/GameFileCache.cpp b/Source/Core/UICommon/GameFileCache.cpp
index 90dd0c63fc..f72f47c11e 100644
--- a/Source/Core/UICommon/GameFileCache.cpp
+++ b/Source/Core/UICommon/GameFileCache.cpp
@@ -26,14 +26,14 @@
namespace UICommon
{
-static constexpr u32 CACHE_REVISION = 25; // Last changed in PR 12702
+static constexpr u32 CACHE_REVISION = 26; // Last changed in PR 10084
std::vector<std::string> FindAllGamePaths(const std::vector<std::string>& directories_to_scan,
bool recursive_scan)
{
static const std::vector<std::string> search_extensions = {
- ".gcm", ".tgc", ".iso", ".ciso", ".gcz", ".wbfs", ".wia",
- ".rvz", ".nfs", ".wad", ".dol", ".elf", ".json"};
+ ".gcm", ".tgc", ".bin", ".iso", ".ciso", ".gcz", ".wbfs",
+ ".wia", ".rvz", ".nfs", ".wad", ".dol", ".elf", ".json"};
// TODO: We could process paths iteratively as they are found
return Common::DoFileSearch(directories_to_scan, search_extensions, recursive_scan);