summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2011-12-04 14:52:58 +0000
committerMarcus Meissner <marcus@jet.franken.de>2011-12-04 14:52:58 +0000
commit5cb45d11b93bb55cc594c335007d9c5a4d61af3e (patch)
tree09700c735fa8bf15db85b0cf1b6238d2b280299d
parent5f0b352f1a5c2b438edeca19eb76414d4518e3d9 (diff)
downloadlibgphoto2-5cb45d11b93bb55cc594c335007d9c5a4d61af3e.tar.gz
read the canon event mode if not set yet here
git-svn-id: https://svn.code.sf.net/p/gphoto/code/branches/libgphoto2-2_4/libgphoto2@13795 67ed7778-7388-44ab-90cf-0a291f65f57c
-rw-r--r--camlibs/ptp2/library.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/camlibs/ptp2/library.c b/camlibs/ptp2/library.c
index edf6f5a52..da49189a2 100644
--- a/camlibs/ptp2/library.c
+++ b/camlibs/ptp2/library.c
@@ -2293,6 +2293,11 @@ camera_canon_capture (Camera *camera, CameraCaptureType type, CameraFilePath *pa
return GP_ERROR_NOT_SUPPORTED;
}
}
+ if (!params->canon_event_mode) {
+ propval.u16 = 0;
+ ret = ptp_getdevicepropvalue(params, PTP_DPC_CANON_EventEmulateMode, &propval, PTP_DTC_UINT16);
+ if (ret == PTP_RC_OK) params->canon_event_mode = propval.u16;
+ }
if (ptp_property_issupported(params, PTP_DPC_CANON_CaptureTransferMode)) {
if ((GP_OK == gp_setting_get("ptp2","capturetarget",buf)) && !strcmp(buf,"sdram"))