Qt: put preferences and about in native spots on MacOS (#676)

This commit is contained in:
Thomas 2024-12-09 19:54:29 +01:00 committed by GitHub
parent cbf1e414a5
commit 6be642a118
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -55,6 +55,8 @@ MainWindow::MainWindow(QApplication* app, QWidget* parent) : QMainWindow(parent)
auto resumeAction = emulationMenu->addAction(tr("Resume"));
auto resetAction = emulationMenu->addAction(tr("Reset"));
auto configureAction = emulationMenu->addAction(tr("Configure"));
configureAction->setMenuRole(QAction::PreferencesRole);
connect(pauseAction, &QAction::triggered, this, [this]() { sendMessage(EmulatorMessage{.type = MessageType::Pause}); });
connect(resumeAction, &QAction::triggered, this, [this]() { sendMessage(EmulatorMessage{.type = MessageType::Resume}); });
connect(resetAction, &QAction::triggered, this, [this]() { sendMessage(EmulatorMessage{.type = MessageType::Reset}); });
@ -75,7 +77,9 @@ MainWindow::MainWindow(QApplication* app, QWidget* parent) : QMainWindow(parent)
connect(dumpDspFirmware, &QAction::triggered, this, &MainWindow::dumpDspFirmware);
auto aboutAction = aboutMenu->addAction(tr("About Panda3DS"));
aboutAction->setMenuRole(QAction::AboutRole);
connect(aboutAction, &QAction::triggered, this, &MainWindow::showAboutMenu);
setMenuBar(menuBar);
emu->setOutputSize(screen->surfaceWidth, screen->surfaceHeight);