summaryrefslogtreecommitdiff
path: root/camlibs
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2020-06-11 16:50:40 +0200
committerMarcus Meissner <marcus@jet.franken.de>2020-06-11 16:50:40 +0200
commit56fdba40c1055f95c246c8be747e0a23ff3f7dae (patch)
tree3ded52035552caa5aa03c4ab628d57c2898648ff /camlibs
parentfb5e676b71560e27d3d8bb3aabd6b303cc83ffcf (diff)
downloadlibgphoto2-56fdba40c1055f95c246c8be747e0a23ff3f7dae.tar.gz
do not call startliveview if not there
(Nikon V1 does not have it, all other Nikon 1 apparently do) more for https://github.com/gphoto/gphoto2/issues/336
Diffstat (limited to 'camlibs')
-rw-r--r--camlibs/ptp2/library.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/camlibs/ptp2/library.c b/camlibs/ptp2/library.c
index 84066f915..0b435ec93 100644
--- a/camlibs/ptp2/library.c
+++ b/camlibs/ptp2/library.c
@@ -3692,7 +3692,7 @@ camera_nikon_capture (Camera *camera, CameraCaptureType type, CameraFilePath *pa
if (params->inliveview) af = 0;
}
- if (NIKON_1(params)) {
+ if (NIKON_1(params) && ptp_operation_issupported(params,PTP_OC_NIKON_StartLiveView)) { /* V1 does not have startliveview */
ret = ptp_nikon_start_liveview (params);
if ((ret != PTP_RC_OK) && (ret != PTP_RC_DeviceBusy))
C_PTP_REP_MSG(ret, _("Failed to enable liveview on a Nikon 1, but it is required for capture"));
@@ -5388,8 +5388,8 @@ camera_trigger_capture (Camera *camera, GPContext *context)
params->controlmode = 1;
}
- /* On Nikon 1 series, the liveview must be enabled before capture works */
- if (NIKON_1(params)) {
+ /* On Nikon 1 series, the liveview must be enabled before capture works ... not on V1 which does not have it. */
+ if (NIKON_1(params) && ptp_operation_issupported(params,PTP_OC_NIKON_StartLiveView)) {
ret = ptp_nikon_start_liveview (params);
if ((ret != PTP_RC_OK) && (ret != PTP_RC_DeviceBusy))
C_PTP_REP_MSG(ret, _("Failed to enable liveview on a Nikon 1, but it is required for capture"));