mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
Qt/GameList: Add "Change Disc" option
This commit is contained in:
parent
c97a799c5f
commit
8f8e96f59f
@ -20,6 +20,7 @@
|
|||||||
#include "Common/FileUtil.h"
|
#include "Common/FileUtil.h"
|
||||||
#include "Core/ConfigManager.h"
|
#include "Core/ConfigManager.h"
|
||||||
#include "Core/Core.h"
|
#include "Core/Core.h"
|
||||||
|
#include "Core/HW/DVD/DVDInterface.h"
|
||||||
#include "DiscIO/Blob.h"
|
#include "DiscIO/Blob.h"
|
||||||
#include "DiscIO/Enums.h"
|
#include "DiscIO/Enums.h"
|
||||||
|
|
||||||
@ -169,6 +170,15 @@ void GameList::ShowContextMenu(const QPoint&)
|
|||||||
else if (blob_type == DiscIO::BlobType::PLAIN)
|
else if (blob_type == DiscIO::BlobType::PLAIN)
|
||||||
menu->addAction(tr("Compress ISO..."), this, &GameList::CompressISO);
|
menu->addAction(tr("Compress ISO..."), this, &GameList::CompressISO);
|
||||||
|
|
||||||
|
QAction* change_disc = menu->addAction(tr("Change &Disc"), this, &GameList::ChangeDisc);
|
||||||
|
|
||||||
|
connect(this, &GameList::EmulationStarted, change_disc,
|
||||||
|
[change_disc] { change_disc->setEnabled(true); });
|
||||||
|
connect(this, &GameList::EmulationStopped, change_disc,
|
||||||
|
[change_disc] { change_disc->setEnabled(false); });
|
||||||
|
|
||||||
|
change_disc->setEnabled(Core::IsRunning());
|
||||||
|
|
||||||
menu->addSeparator();
|
menu->addSeparator();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -409,6 +419,11 @@ void GameList::DeleteFile()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GameList::ChangeDisc()
|
||||||
|
{
|
||||||
|
DVDInterface::ChangeDiscAsHost(GetSelectedGame()->GetFilePath().toStdString());
|
||||||
|
}
|
||||||
|
|
||||||
QSharedPointer<GameFile> GameList::GetSelectedGame() const
|
QSharedPointer<GameFile> GameList::GetSelectedGame() const
|
||||||
{
|
{
|
||||||
QAbstractItemView* view;
|
QAbstractItemView* view;
|
||||||
|
@ -46,6 +46,7 @@ private:
|
|||||||
void UninstallWAD();
|
void UninstallWAD();
|
||||||
void ExportWiiSave();
|
void ExportWiiSave();
|
||||||
void CompressISO();
|
void CompressISO();
|
||||||
|
void ChangeDisc();
|
||||||
void OnHeaderViewChanged();
|
void OnHeaderViewChanged();
|
||||||
|
|
||||||
void MakeListView();
|
void MakeListView();
|
||||||
|
Loading…
Reference in New Issue
Block a user