mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-25 15:19:53 -06:00
macOS: Allow opening ROMs with melonDS from Finder.
This commit is contained in:
@ -19,6 +19,7 @@
|
||||
#ifndef MAIN_H
|
||||
#define MAIN_H
|
||||
|
||||
#include <QApplication>
|
||||
#include <QThread>
|
||||
#include <QWidget>
|
||||
#include <QWindow>
|
||||
@ -189,6 +190,14 @@ private:
|
||||
GLuint screenTexture;
|
||||
};
|
||||
|
||||
class MelonApplication : public QApplication
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MelonApplication(int &argc, char** argv);
|
||||
bool event(QEvent* event) override;
|
||||
};
|
||||
|
||||
class MainWindow : public QMainWindow
|
||||
{
|
||||
@ -201,6 +210,9 @@ public:
|
||||
bool hasOGL;
|
||||
QOpenGLContext* getOGLContext();
|
||||
|
||||
void loadROM(QString filename);
|
||||
void loadROM(QByteArray *romData, QString archiveFileName, QString romFileName);
|
||||
|
||||
void onAppStateChanged(Qt::ApplicationState state);
|
||||
|
||||
protected:
|
||||
@ -278,8 +290,6 @@ private:
|
||||
QList<QString> recentFileList;
|
||||
QMenu *recentMenu;
|
||||
void updateRecentFilesMenu();
|
||||
void loadROM(QString filename);
|
||||
void loadROM(QByteArray *romData, QString archiveFileName, QString romFileName);
|
||||
|
||||
QString pickAndExtractFileFromArchive(QString archiveFileName, QByteArray *romBuffer);
|
||||
|
||||
|
Reference in New Issue
Block a user