all repos — mgba @ 2d5bfe33211e897a78e28283797376f752764010

mGBA Game Boy Advance Emulator

Qt: Ensure camera image is valid
Vicki Pfau vi@endrift.com
Mon, 01 Oct 2018 12:07:56 -0700
commit

2d5bfe33211e897a78e28283797376f752764010

parent

2bfc3e0ca623e4140e0f44ea75ab04512e41681a

2 files changed, 5 insertions(+), 4 deletions(-)

jump to
M CHANGESCHANGES

@@ -120,6 +120,7 @@ - mGUI: Add support for different settings types

- Wii: Define _GNU_SOURCE (fixes mgba.io/i/1106) - Wii: Expose stretch configuration in settings - Wii: Stretch now sets pixel-accurate mode size cap + - Qt: Ensure camera image is valid 0.7 beta 1: (2018-09-24) - Initial beta for 0.7
M src/platform/qt/InputController.cppsrc/platform/qt/InputController.cpp

@@ -678,13 +678,13 @@ }

} void InputController::loadCamImage(const QString& path) { - QMutexLocker locker(&m_image.mutex); - m_image.image.load(path); - m_image.resizedImage = QImage(); - m_image.outOfDate = true; + setCamImage(QImage(path)); } void InputController::setCamImage(const QImage& image) { + if (image.isNull()) { + return; + } QMutexLocker locker(&m_image.mutex); m_image.image = image; m_image.resizedImage = QImage();