mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-07 07:21:25 +12:00
Disable remove custom config if no custom config exists.
This commit is contained in:
parent
0405b860c6
commit
9403948ce3
3 changed files with 15 additions and 8 deletions
|
@ -597,6 +597,8 @@ void game_list_frame::ShowSpecifiedContextMenu(const QPoint &pos, int row)
|
||||||
globalPos = m_xgrid->mapToGlobal(pos);
|
globalPos = m_xgrid->mapToGlobal(pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GameInfo currGame = m_game_data[row].info;
|
||||||
|
|
||||||
QMenu myMenu;
|
QMenu myMenu;
|
||||||
|
|
||||||
// Make Actions
|
// Make Actions
|
||||||
|
@ -616,7 +618,7 @@ void game_list_frame::ShowSpecifiedContextMenu(const QPoint &pos, int row)
|
||||||
|
|
||||||
connect(boot, &QAction::triggered, [=]() {Boot(row); });
|
connect(boot, &QAction::triggered, [=]() {Boot(row); });
|
||||||
connect(configure, &QAction::triggered, [=]() {
|
connect(configure, &QAction::triggered, [=]() {
|
||||||
settings_dialog (xgui_settings, m_Render_Creator, 0, this, &m_game_data[row].info).exec();
|
settings_dialog (xgui_settings, m_Render_Creator, 0, this, &currGame).exec();
|
||||||
});
|
});
|
||||||
connect(removeGame, &QAction::triggered, [=]() {
|
connect(removeGame, &QAction::triggered, [=]() {
|
||||||
if (QMessageBox::question(this, tr("Confirm Delete"), tr("Permanently delete files?")) == QMessageBox::Yes)
|
if (QMessageBox::question(this, tr("Confirm Delete"), tr("Permanently delete files?")) == QMessageBox::Yes)
|
||||||
|
@ -627,16 +629,15 @@ void game_list_frame::ShowSpecifiedContextMenu(const QPoint &pos, int row)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
connect(removeConfig, &QAction::triggered, [=]() {RemoveCustomConfiguration(row); });
|
connect(removeConfig, &QAction::triggered, [=]() {RemoveCustomConfiguration(row); });
|
||||||
connect(openGameFolder, &QAction::triggered, [=]() {open_dir(Emu.GetGameDir() + m_game_data[row].info.root); });
|
connect(openGameFolder, &QAction::triggered, [=]() {open_dir(Emu.GetGameDir() + currGame.root); });
|
||||||
connect(openConfig, &QAction::triggered, [=]() {open_dir(fs::get_config_dir() + "data/" + m_game_data[row].info.serial); });
|
connect(openConfig, &QAction::triggered, [=]() {open_dir(fs::get_config_dir() + "data/" + currGame.serial); });
|
||||||
connect(checkCompat, &QAction::triggered, [=]() {
|
connect(checkCompat, &QAction::triggered, [=]() {
|
||||||
QString serial = qstr(m_game_data[row].info.serial);
|
QString link = "https://rpcs3.net/compatibility?g=" + qstr(currGame.serial);
|
||||||
QString link = "https://rpcs3.net/compatibility?g=" + serial;
|
|
||||||
QDesktopServices::openUrl(QUrl(link));
|
QDesktopServices::openUrl(QUrl(link));
|
||||||
});
|
});
|
||||||
|
|
||||||
//Disable options depending on software category
|
//Disable options depending on software category
|
||||||
QString category = qstr(m_game_data[row].info.category);
|
QString category = qstr(currGame.category);
|
||||||
|
|
||||||
if (category == category::disc_Game)
|
if (category == category::disc_Game)
|
||||||
{
|
{
|
||||||
|
@ -655,6 +656,12 @@ void game_list_frame::ShowSpecifiedContextMenu(const QPoint &pos, int row)
|
||||||
checkCompat->setEnabled(false);
|
checkCompat->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Disable removeconfig if no config exists.
|
||||||
|
if (fs::is_file(fs::get_config_dir() + "data/" + currGame.serial + "/config.yml") == false)
|
||||||
|
{
|
||||||
|
removeConfig->setEnabled(false);
|
||||||
|
}
|
||||||
|
|
||||||
myMenu.exec(globalPos);
|
myMenu.exec(globalPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
inline std::string sstr(const QString& _in) { return _in.toUtf8().toStdString(); }
|
inline std::string sstr(const QString& _in) { return _in.toUtf8().toStdString(); }
|
||||||
|
|
||||||
settings_dialog::settings_dialog(std::shared_ptr<gui_settings> xSettings, const Render_Creator& r_Creator, const int& tabIndex, QWidget *parent, GameInfo* game)
|
settings_dialog::settings_dialog(std::shared_ptr<gui_settings> xSettings, const Render_Creator& r_Creator, const int& tabIndex, QWidget *parent, const GameInfo* game)
|
||||||
: QDialog(parent), xgui_settings(xSettings), ui(new Ui::settings_dialog)
|
: QDialog(parent), xgui_settings(xSettings), ui(new Ui::settings_dialog)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
|
@ -19,7 +19,7 @@ class settings_dialog : public QDialog
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit settings_dialog(std::shared_ptr<gui_settings> xSettings, const Render_Creator& r_Creator, const int& tabIndex = 0, QWidget *parent = 0, GameInfo *game = nullptr);
|
explicit settings_dialog(std::shared_ptr<gui_settings> xSettings, const Render_Creator& r_Creator, const int& tabIndex = 0, QWidget *parent = 0, const GameInfo *game = nullptr);
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void GuiSettingsSyncRequest();
|
void GuiSettingsSyncRequest();
|
||||||
void GuiStylesheetRequest(const QString& path);
|
void GuiStylesheetRequest(const QString& path);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue