all repos — mgba @ 3c85f40a8f52f0780ecd7339697e60111f53ec1b

mGBA Game Boy Advance Emulator

Qt: Warn when DS BIOS and firmware are missing
Vicki Pfau vi@endrift.com
Thu, 06 Apr 2017 11:45:32 -0700
commit

3c85f40a8f52f0780ecd7339697e60111f53ec1b

parent

926fecfadac5d04c41d119c9beba0e04b0523022

1 files changed, 12 insertions(+), 1 deletions(-)

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

@@ -767,10 +767,21 @@ MutexUnlock(&context->stateMutex);

return; } MutexUnlock(&context->stateMutex); + int platform = 1 << context->core->platform(context->core); +#ifdef M_CORE_DS + if ((platform & SUPPORT_DS) && (!m_config->getOption("useBios").toInt() || m_config->getOption("ds.bios7").isNull() || m_config->getOption("ds.bios9").isNull() || m_config->getOption("ds.firmware").isNull())) { + QMessageBox* fail = new QMessageBox(QMessageBox::Warning, tr("BIOS required"), + tr("DS supoprt requires dumps of the BIOS and firmware."), + QMessageBox::Ok, this, Qt::Sheet); + fail->setAttribute(Qt::WA_DeleteOnClose); + fail->show(); + m_controller->closeGame(); + return; + } +#endif foreach (QAction* action, m_gameActions) { action->setDisabled(false); } - int platform = 1 << context->core->platform(context->core); for (QPair<QAction*, int> action : m_platformActions) { action.first->setEnabled(action.second & platform); }