Load BIOS from menu
Jeffrey Pfau jeffrey@endrift.com
Sat, 18 Oct 2014 17:21:05 -0700
2 files changed,
12 insertions(+),
7 deletions(-)
M
src/platform/qt/Window.cpp
→
src/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.h
→
src/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*);