Add "Open melonDS directory" menu option

This commit is contained in:
Nadia Holmquist Pedersen 2024-08-07 15:53:58 +02:00
parent dd386d12a9
commit 8423dae6ff
2 changed files with 8 additions and 0 deletions

View File

@ -39,6 +39,7 @@
#include <QMimeData>
#include <QVector>
#include <QCommandLineParser>
#include <QDesktopServices>
#ifndef _WIN32
#include <QGuiApplication>
#include <QSocketNotifier>
@ -366,6 +367,12 @@ MainWindow::MainWindow(int id, EmuInstance* inst, QWidget* parent) :
actUndoStateLoad->setShortcut(QKeySequence(Qt::Key_F12));
connect(actUndoStateLoad, &QAction::triggered, this, &MainWindow::onUndoStateLoad);
menu->addSeparator();
actOpenConfig = menu->addAction("Open melonDS directory");
connect(actOpenConfig, &QAction::triggered, this, [&]() {
QDesktopServices::openUrl(QUrl::fromLocalFile(emuDirectory));
});
menu->addSeparator();
actQuit = menu->addAction("Quit");

View File

@ -264,6 +264,7 @@ public:
QAction* actSaveState[9];
QAction* actLoadState[9];
QAction* actUndoStateLoad;
QAction* actOpenConfig;
QAction* actQuit;
QAction* actPause;