Add "Open melonDS directory" menu option
This commit is contained in:
parent
dd386d12a9
commit
8423dae6ff
|
@ -39,6 +39,7 @@
|
||||||
#include <QMimeData>
|
#include <QMimeData>
|
||||||
#include <QVector>
|
#include <QVector>
|
||||||
#include <QCommandLineParser>
|
#include <QCommandLineParser>
|
||||||
|
#include <QDesktopServices>
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
#include <QGuiApplication>
|
#include <QGuiApplication>
|
||||||
#include <QSocketNotifier>
|
#include <QSocketNotifier>
|
||||||
|
@ -366,6 +367,12 @@ MainWindow::MainWindow(int id, EmuInstance* inst, QWidget* parent) :
|
||||||
actUndoStateLoad->setShortcut(QKeySequence(Qt::Key_F12));
|
actUndoStateLoad->setShortcut(QKeySequence(Qt::Key_F12));
|
||||||
connect(actUndoStateLoad, &QAction::triggered, this, &MainWindow::onUndoStateLoad);
|
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();
|
menu->addSeparator();
|
||||||
|
|
||||||
actQuit = menu->addAction("Quit");
|
actQuit = menu->addAction("Quit");
|
||||||
|
|
|
@ -264,6 +264,7 @@ public:
|
||||||
QAction* actSaveState[9];
|
QAction* actSaveState[9];
|
||||||
QAction* actLoadState[9];
|
QAction* actLoadState[9];
|
||||||
QAction* actUndoStateLoad;
|
QAction* actUndoStateLoad;
|
||||||
|
QAction* actOpenConfig;
|
||||||
QAction* actQuit;
|
QAction* actQuit;
|
||||||
|
|
||||||
QAction* actPause;
|
QAction* actPause;
|
||||||
|
|
Loading…
Reference in New Issue