Qt: Ensure camera image is valid
Vicki Pfau vi@endrift.com
Mon, 01 Oct 2018 12:07:56 -0700
2 files changed,
5 insertions(+),
4 deletions(-)
M
CHANGES
→
CHANGES
@@ -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.cpp
→
src/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();