From 9bbaab78712feceb161ae2319aad448b89aad72b Mon Sep 17 00:00:00 2001 From: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com> Date: Mon, 30 Oct 2023 20:46:11 +0200 Subject: [PATCH] [Qt] Add Pause/Resume/Reset --- src/panda_qt/main_window.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/panda_qt/main_window.cpp b/src/panda_qt/main_window.cpp index 8b70c04c..ab717087 100644 --- a/src/panda_qt/main_window.cpp +++ b/src/panda_qt/main_window.cpp @@ -27,6 +27,13 @@ MainWindow::MainWindow(QApplication* app, QWidget* parent) : QMainWindow(parent) auto pandaAction = fileMenu->addAction(tr("panda...")); connect(pandaAction, &QAction::triggered, this, &MainWindow::selectROM); + auto pauseAction = emulationMenu->addAction(tr("Pause")); + auto resumeAction = emulationMenu->addAction(tr("Resume")); + auto resetAction = emulationMenu->addAction(tr("Reset")); + 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}); }); + auto dumpRomFSAction = toolsMenu->addAction(tr("Dump RomFS")); connect(dumpRomFSAction, &QAction::triggered, this, &MainWindow::dumpRomFS);