Implement MainRAM management dialog😁 (#1248)

* Implement MainRAM management dialog

* Modify RAMInfoDialog

- use emuThread to avoid a race condition.
- replace RAMUpdateThread to QTimer

Co-Authored-By: RSDuck <RSDuck@users.noreply.github.com>

* Update src/frontend/qt_sdl/RAMInfoDialog.cpp

small typo

Co-authored-by: Rayyan Ansari <68647953+RayyanAnsari@users.noreply.github.com>

* Update src/frontend/qt_sdl/RAMInfoDialog.h

small typo

Co-authored-by: Rayyan Ansari <68647953+RayyanAnsari@users.noreply.github.com>

* typo errors in RAMInfoDialog

Rrevious->Previous

* add new line to the end of the file

Co-authored-by: Rayyan Ansari <rayyan@ansari.sh>

* enable raminfo when cart is inserted

* Modify that only the 'value' item can be edited in RAMinfoDialog

* fix: function name incorrect error

* fix: function name incorrect error2

* fix: wrong way to get ram value

Co-authored-by: RSDuck <RSDuck@users.noreply.github.com>
Co-authored-by: Rayyan Ansari <68647953+RayyanAnsari@users.noreply.github.com>
Co-authored-by: Rayyan Ansari <rayyan@ansari.sh>
This commit is contained in:
2jun0
2022-03-07 06:33:11 +09:00
committed by GitHub
parent 38c8b886ea
commit c66df57256
6 changed files with 714 additions and 0 deletions

View File

@ -60,6 +60,7 @@
#include "WifiSettingsDialog.h"
#include "InterfaceSettingsDialog.h"
#include "ROMInfoDialog.h"
#include "RAMInfoDialog.h"
#include "TitleManagerDialog.h"
#include "types.h"
@ -1440,6 +1441,9 @@ MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent)
actROMInfo = menu->addAction("ROM info");
connect(actROMInfo, &QAction::triggered, this, &MainWindow::onROMInfo);
actRAMInfo = menu->addAction("RAM info");
connect(actRAMInfo, &QAction::triggered, this, &MainWindow::onRAMInfo);
actTitleManager = menu->addAction("Manage DSi titles");
connect(actTitleManager, &QAction::triggered, this, &MainWindow::onOpenTitleManager);
}
@ -1671,6 +1675,7 @@ MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent)
actEnableCheats->setChecked(Config::EnableCheats);
actROMInfo->setEnabled(false);
actRAMInfo->setEnabled(false);
actSavestateSRAMReloc->setChecked(Config::SavestateRelocSRAM);
@ -2082,6 +2087,7 @@ void MainWindow::updateCartInserted(bool gba)
actImportSavefile->setEnabled(inserted);
actSetupCheats->setEnabled(inserted);
actROMInfo->setEnabled(inserted);
actRAMInfo->setEnabled(inserted);
}
}
@ -2557,6 +2563,11 @@ void MainWindow::onROMInfo()
ROMInfoDialog* dlg = ROMInfoDialog::openDlg(this);
}
void MainWindow::onRAMInfo()
{
RAMInfoDialog* dlg = RAMInfoDialog::openDlg(this);
}
void MainWindow::onOpenTitleManager()
{
TitleManagerDialog* dlg = TitleManagerDialog::openDlg(this);