all repos — mgba @ a8e924ae5ebe4819114d25f91ac9ca301cd24fc0

mGBA Game Boy Advance Emulator

Qt: Fix unhandled case warnings
Vicki Pfau vi@endrift.com
Sat, 05 Dec 2020 19:52:18 -0800
commit

a8e924ae5ebe4819114d25f91ac9ca301cd24fc0

parent

d28fda120bb8a9500a33c93ef101ddc762fd009e

2 files changed, 13 insertions(+), 0 deletions(-)

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

@@ -654,6 +654,9 @@ case PLATFORM_GB:

GBYankROM(static_cast<GB*>(m_threadContext.core->board)); break; #endif + case PLATFORM_NONE: + LOG(QT, ERROR) << tr("Can't yank pack in unexpected platform!"); + break; } }
M src/platform/qt/FrameView.cppsrc/platform/qt/FrameView.cpp

@@ -302,6 +302,10 @@ break;

case LayerId::WINDOW: m_vl->enableVideoLayer(m_vl, GBA_LAYER_WIN0 + layer.id.index, layer.enabled); break; + case LayerId::BACKDROP: + case LayerId::FRAME: + case LayerId::NONE: + break; } } if (m_overrideBackdrop.isValid()) {

@@ -408,6 +412,10 @@ if (layer.id == m_active) {

gb->video.renderer->highlightWIN = true; } break; + case LayerId::FRAME: // TODO for SGB + case LayerId::BACKDROP: + case LayerId::NONE: + break; } } }

@@ -433,6 +441,8 @@ case PLATFORM_GB:

injectGB(); break; #endif + case PLATFORM_NONE: + break; } if (m_ui.disableScanline->checkState() == Qt::Checked) { mVideoLoggerIgnoreAfterInjection(logger, (1 << DIRTY_PALETTE) | (1 << DIRTY_OAM) | (1 << DIRTY_REGISTER));