Patch menu

This commit is contained in:
Jeffrey Pfau 2014-10-24 02:23:48 -07:00
parent a2ee0c20dc
commit 26c1b3c6c9
2 changed files with 9 additions and 0 deletions

View File

@ -131,6 +131,13 @@ void Window::selectBIOS() {
}
}
void Window::selectPatch() {
QString filename = QFileDialog::getOpenFileName(this, tr("Select patch"), QString(), tr("Patches (*.ips *.ups)"));
if (!filename.isEmpty()) {
m_controller->loadPatch(filename);
}
}
#ifdef USE_GDB_STUB
void Window::gdbOpen() {
if (!m_gdbController) {
@ -250,6 +257,7 @@ void Window::setupMenu(QMenuBar* menubar) {
QMenu* fileMenu = menubar->addMenu(tr("&File"));
fileMenu->addAction(tr("Load &ROM..."), this, SLOT(selectROM()), QKeySequence::Open);
fileMenu->addAction(tr("Load &BIOS..."), this, SLOT(selectBIOS()));
fileMenu->addAction(tr("Load &patch..."), this, SLOT(selectPatch()));
fileMenu->addSeparator();

View File

@ -42,6 +42,7 @@ signals:
public slots:
void selectROM();
void selectBIOS();
void selectPatch();
void toggleFullScreen();
#ifdef USE_GDB_STUB