diff options
author | Arisotura <thetotalworm@gmail.com> | 2020-08-11 17:38:29 +0200 |
---|---|---|
committer | Arisotura <thetotalworm@gmail.com> | 2020-08-11 17:38:29 +0200 |
commit | 0bd53a34ef975b12563ccfa6247def84789d098b (patch) | |
tree | 40a8bcbe021e5037098f95660c376776a777c7c2 /src/frontend/qt_sdl/main.cpp | |
parent | e217d016a75eda47ee462d71cacbbf586770f6a8 (diff) |
lay base for the actual dialog
also make EmuSettingsDialog properly modal
Diffstat (limited to 'src/frontend/qt_sdl/main.cpp')
-rw-r--r-- | src/frontend/qt_sdl/main.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/frontend/qt_sdl/main.cpp b/src/frontend/qt_sdl/main.cpp index e7f35c2..903e654 100644 --- a/src/frontend/qt_sdl/main.cpp +++ b/src/frontend/qt_sdl/main.cpp @@ -34,6 +34,7 @@ #include "main.h" #include "Input.h" +#include "CheatsDialog.h" #include "EmuSettingsDialog.h" #include "InputConfigDialog.h" #include "VideoSettingsDialog.h" @@ -1062,6 +1063,14 @@ MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent) actStop = menu->addAction("Stop"); connect(actStop, &QAction::triggered, this, &MainWindow::onStop); + + menu->addSeparator(); + + actEnableCheats = menu->addAction("Enable cheats"); + connect(actEnableCheats, &QAction::triggered, this, &MainWindow::onEnableCheats); + + actSetupCheats = menu->addAction("Setup cheat codes"); + connect(actSetupCheats, &QAction::triggered, this, &MainWindow::onSetupCheats); } { QMenu* menu = menubar->addMenu("Config"); @@ -1651,6 +1660,24 @@ void MainWindow::onStop() NDS::Stop(); } +void MainWindow::onEnableCheats(bool checked) +{ + // +} + +void MainWindow::onSetupCheats() +{ + emuThread->emuPause(); + + CheatsDialog* dlg = CheatsDialog::openDlg(this); + connect(dlg, &CheatsDialog::finished, this, &MainWindow::onCheatsDialogFinished); +} + +void MainWindow::onCheatsDialogFinished(int res) +{ + emuThread->emuUnpause(); +} + void MainWindow::onOpenEmuSettings() { |