summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaurice Kalinowski <maurice.kalinowski@qt.io>2016-04-22 11:02:13 +0200
committerMaurice Kalinowski <maurice.kalinowski@qt.io>2016-04-22 11:44:56 +0000
commit7553a0521356d0b28bacb8c8d07a25e4ba26097e (patch)
tree293ab5fd2e2b7e87596662ebab35d33e4c3bd003
parenta75f8fd0bb19b76a7577c695208b385381a35278 (diff)
downloadqtmultimedia-7553a0521356d0b28bacb8c8d07a25e4ba26097e.tar.gz
winrt: Disable camera deactivation automation in debug mode
Camera control reacts to an application becoming inactive and turns off the camera. However, when debugging or watching internals inside an IDE this feature breaks the state of the application as the IDE gets focus and hence camera is turned off. Change-Id: I6f80476592c0faa32e9da11401f699c6211d226a Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
-rw-r--r--src/plugins/winrt/qwinrtcameracontrol.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/winrt/qwinrtcameracontrol.cpp b/src/plugins/winrt/qwinrtcameracontrol.cpp
index b6068594a..effddafe3 100644
--- a/src/plugins/winrt/qwinrtcameracontrol.cpp
+++ b/src/plugins/winrt/qwinrtcameracontrol.cpp
@@ -823,6 +823,9 @@ void QWinRTCameraControl::onBufferRequested()
void QWinRTCameraControl::onApplicationStateChanged(Qt::ApplicationState state)
{
qCDebug(lcMMCamera) << __FUNCTION__ << state;
+#ifdef _DEBUG
+ return;
+#else // !_DEBUG
Q_D(QWinRTCameraControl);
static QCamera::State savedState = d->state;
switch (state) {
@@ -838,6 +841,7 @@ void QWinRTCameraControl::onApplicationStateChanged(Qt::ApplicationState state)
default:
break;
}
+#endif // _DEBUG
}
HRESULT QWinRTCameraControl::initialize()