Load BIOS from menu

This commit is contained in:
Jeffrey Pfau 2014-10-18 17:21:05 -07:00
parent 54be75bb92
commit e84727c94b
2 changed files with 12 additions and 7 deletions

View File

@ -132,6 +132,13 @@ void Window::selectROM() {
}
}
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

View File

@ -33,9 +33,13 @@ public:
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();
@ -47,13 +51,6 @@ protected:
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*);
void gameStopped();