Adding support for detecting .bin images
This commit is contained in:
parent
056b0339be
commit
82ef430759
|
@ -30,8 +30,8 @@ import java.util.Set;
|
|||
public final class FileBrowserHelper
|
||||
{
|
||||
public static final HashSet<String> GAME_EXTENSIONS = new HashSet<>(Arrays.asList(
|
||||
"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"));
|
||||
|
||||
public static final HashSet<String> GAME_LIKE_EXTENSIONS = new HashSet<>(GAME_EXTENSIONS);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>bin</string>
|
||||
<string>ciso</string>
|
||||
<string>dol</string>
|
||||
<string>elf</string>
|
||||
|
|
|
@ -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")));
|
||||
|
|
|
@ -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"))));
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue