mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
GameList: Show game mod descriptor .json files in game list.
This commit is contained in:
@ -352,16 +352,17 @@ void GameList::ShowContextMenu(const QPoint&)
|
||||
else
|
||||
{
|
||||
const auto game = GetSelectedGame();
|
||||
const bool is_mod_descriptor = game->IsModDescriptor();
|
||||
DiscIO::Platform platform = game->GetPlatform();
|
||||
menu->addAction(tr("&Properties"), this, &GameList::OpenProperties);
|
||||
if (platform != DiscIO::Platform::ELFOrDOL)
|
||||
if (!is_mod_descriptor && platform != DiscIO::Platform::ELFOrDOL)
|
||||
{
|
||||
menu->addAction(tr("&Wiki"), this, &GameList::OpenWiki);
|
||||
}
|
||||
|
||||
menu->addSeparator();
|
||||
|
||||
if (DiscIO::IsDisc(platform))
|
||||
if (!is_mod_descriptor && DiscIO::IsDisc(platform))
|
||||
{
|
||||
menu->addAction(tr("Start with Riivolution Patches..."), this,
|
||||
&GameList::StartWithRiivolution);
|
||||
@ -382,7 +383,7 @@ void GameList::ShowContextMenu(const QPoint&)
|
||||
menu->addSeparator();
|
||||
}
|
||||
|
||||
if (platform == DiscIO::Platform::WiiDisc)
|
||||
if (!is_mod_descriptor && platform == DiscIO::Platform::WiiDisc)
|
||||
{
|
||||
auto* perform_disc_update = menu->addAction(tr("Perform System Update"), this,
|
||||
[this, file_path = game->GetFilePath()] {
|
||||
@ -394,7 +395,7 @@ void GameList::ShowContextMenu(const QPoint&)
|
||||
perform_disc_update->setEnabled(!Core::IsRunning() || !SConfig::GetInstance().bWii);
|
||||
}
|
||||
|
||||
if (platform == DiscIO::Platform::WiiWAD)
|
||||
if (!is_mod_descriptor && platform == DiscIO::Platform::WiiWAD)
|
||||
{
|
||||
QAction* wad_install_action = new QAction(tr("Install to the NAND"), menu);
|
||||
QAction* wad_uninstall_action = new QAction(tr("Uninstall from the NAND"), menu);
|
||||
@ -420,14 +421,15 @@ void GameList::ShowContextMenu(const QPoint&)
|
||||
menu->addSeparator();
|
||||
}
|
||||
|
||||
if (platform == DiscIO::Platform::WiiWAD || platform == DiscIO::Platform::WiiDisc)
|
||||
if (!is_mod_descriptor &&
|
||||
(platform == DiscIO::Platform::WiiWAD || platform == DiscIO::Platform::WiiDisc))
|
||||
{
|
||||
menu->addAction(tr("Open Wii &Save Folder"), this, &GameList::OpenWiiSaveFolder);
|
||||
menu->addAction(tr("Export Wii Save"), this, &GameList::ExportWiiSave);
|
||||
menu->addSeparator();
|
||||
}
|
||||
|
||||
if (platform == DiscIO::Platform::GameCubeDisc)
|
||||
if (!is_mod_descriptor && platform == DiscIO::Platform::GameCubeDisc)
|
||||
{
|
||||
menu->addAction(tr("Open GameCube &Save Folder"), this, &GameList::OpenGCSaveFolder);
|
||||
menu->addSeparator();
|
||||
|
@ -27,7 +27,7 @@ static const QStringList game_filters{
|
||||
QStringLiteral("*.[gG][cC][zZ]"), QStringLiteral("*.[wW][bB][fF][sS]"),
|
||||
QStringLiteral("*.[wW][iI][aA]"), QStringLiteral("*.[rR][vV][zZ]"),
|
||||
QStringLiteral("*.[wW][aA][dD]"), QStringLiteral("*.[eE][lL][fF]"),
|
||||
QStringLiteral("*.[dD][oO][lL]")};
|
||||
QStringLiteral("*.[dD][oO][lL]"), QStringLiteral("*.[jJ][sS][oO][nN]")};
|
||||
|
||||
GameTracker::GameTracker(QObject* parent) : QFileSystemWatcher(parent)
|
||||
{
|
||||
|
@ -733,8 +733,10 @@ QStringList MainWindow::PromptFileNames()
|
||||
QStringList paths = DolphinFileDialog::getOpenFileNames(
|
||||
this, tr("Select a File"),
|
||||
settings.value(QStringLiteral("mainwindow/lastdir"), QString{}).toString(),
|
||||
tr("All GC/Wii files (*.elf *.dol *.gcm *.iso *.tgc *.wbfs *.ciso *.gcz *.wia *.rvz *.wad "
|
||||
"*.dff *.m3u);;All Files (*)"));
|
||||
QStringLiteral("%1 (*.elf *.dol *.gcm *.iso *.tgc *.wbfs *.ciso *.gcz *.wia *.rvz *.wad "
|
||||
"*.dff *.m3u *.json);;%2 (*)")
|
||||
.arg(tr("All GC/Wii files"))
|
||||
.arg(tr("All Files")));
|
||||
|
||||
if (!paths.isEmpty())
|
||||
{
|
||||
|
@ -44,8 +44,10 @@ void PathPane::BrowseDefaultGame()
|
||||
{
|
||||
QString file = QDir::toNativeSeparators(DolphinFileDialog::getOpenFileName(
|
||||
this, tr("Select a Game"), Settings::Instance().GetDefaultGame(),
|
||||
tr("All GC/Wii files (*.elf *.dol *.gcm *.iso *.tgc *.wbfs "
|
||||
"*.ciso *.gcz *.wia *.rvz *.wad *.m3u);;All Files (*)")));
|
||||
QStringLiteral("%1 (*.elf *.dol *.gcm *.iso *.tgc *.wbfs *.ciso *.gcz *.wia *.rvz *.wad "
|
||||
"*.m3u *.json);;%2 (*)")
|
||||
.arg(tr("All GC/Wii files"))
|
||||
.arg(tr("All Files"))));
|
||||
|
||||
if (!file.isEmpty())
|
||||
Settings::Instance().SetDefaultGame(file);
|
||||
|
Reference in New Issue
Block a user