Skip to content

Commit

Permalink
Add "Open melonDS directory" menu option
Browse files Browse the repository at this point in the history
  • Loading branch information
nadiaholmquist committed Aug 7, 2024
1 parent dd386d1 commit 8423dae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/frontend/qt_sdl/Window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include <QMimeData>
#include <QVector>
#include <QCommandLineParser>
#include <QDesktopServices>
#ifndef _WIN32
#include <QGuiApplication>
#include <QSocketNotifier>
Expand Down Expand Up @@ -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");
Expand Down
1 change: 1 addition & 0 deletions src/frontend/qt_sdl/Window.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ private slots:
QAction* actSaveState[9];
QAction* actLoadState[9];
QAction* actUndoStateLoad;
QAction* actOpenConfig;
QAction* actQuit;

QAction* actPause;
Expand Down

0 comments on commit 8423dae

Please sign in to comment.