all repos — mgba @ 26c1b3c6c951c48620e95e720da113a94a9d1bbc

mGBA Game Boy Advance Emulator

Patch menu
Jeffrey Pfau jeffrey@endrift.com
Fri, 24 Oct 2014 02:23:48 -0700
commit

26c1b3c6c951c48620e95e720da113a94a9d1bbc

parent

a2ee0c20dcaf90e4fbb0443db94568db5cd48d7b

2 files changed, 9 insertions(+), 0 deletions(-)

jump to
M src/platform/qt/Window.cppsrc/platform/qt/Window.cpp

@@ -131,6 +131,13 @@ m_controller->loadBIOS(filename);

} } +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 @@ menubar->clear();

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();
M src/platform/qt/Window.hsrc/platform/qt/Window.h

@@ -42,6 +42,7 @@

public slots: void selectROM(); void selectBIOS(); + void selectPatch(); void toggleFullScreen(); #ifdef USE_GDB_STUB