all repos — mgba @ e84727c94b4f2c821c130420ef87d124ec4c3718

mGBA Game Boy Advance Emulator

Load BIOS from menu
Jeffrey Pfau jeffrey@endrift.com
Sat, 18 Oct 2014 17:21:05 -0700
commit

e84727c94b4f2c821c130420ef87d124ec4c3718

parent

54be75bb923c89bcad1947037552a6084b238d9f

2 files changed, 12 insertions(+), 7 deletions(-)

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

@@ -132,6 +132,13 @@ m_controller->loadGame(filename);

} } +void Window::selectBIOS() { + QString filename = QFileDialog::getOpenFileName(this, tr("Select BIOS")); + if (!filename.isEmpty()) { + m_controller->loadBIOS(filename); + } +} + #ifdef USE_GDB_STUB void Window::gdbOpen() { if (!m_gdbController) {

@@ -244,6 +251,7 @@ void Window::setupMenu(QMenuBar* menubar) {

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

@@ -33,9 +33,13 @@

signals: void startDrawing(const uint32_t*, GBAThread*); void shutdown(); + void audioBufferSamplesChanged(int samples); + void fpsTargetChanged(float target); public slots: void selectROM(); + void selectBIOS(); + void toggleFullScreen(); #ifdef USE_GDB_STUB void gdbOpen();

@@ -46,13 +50,6 @@ virtual void keyPressEvent(QKeyEvent* event) override;

virtual void keyReleaseEvent(QKeyEvent* event) override; virtual void resizeEvent(QResizeEvent*) override; virtual void closeEvent(QCloseEvent*) override; - -signals: - void audioBufferSamplesChanged(int samples); - void fpsTargetChanged(float target); - -public slots: - void toggleFullScreen(); private slots: void gameStarted(GBAThread*);