mirror of https://github.com/mgba-emu/mgba.git
Load BIOS from menu
This commit is contained in:
parent
54be75bb92
commit
e84727c94b
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue