diff --git a/camlibs/ptp2/library.c b/camlibs/ptp2/library.c index 573ac91f6..c769e8e17 100644 --- a/camlibs/ptp2/library.c +++ b/camlibs/ptp2/library.c @@ -3090,6 +3090,21 @@ camera_wait_for_event (Camera *camera, int timeout, *eventtype = GP_EVENT_FILE_ADDED; return GP_OK; } + case PTP_EC_CANON_ShutterButtonPressed0: + case PTP_EC_CANON_ShutterButtonPressed1: + { + CameraFilePath *path; + + path = malloc(sizeof(CameraFilePath)); + ret = camera_canon_capture (camera, GP_FILE_TYPE_NORMAL, path, context); + if (ret != GP_OK) { + free (path); + break; + } + *eventdata = path; + *eventtype = GP_EVENT_FILE_ADDED; + return GP_OK; + } default: break; } diff --git a/camlibs/ptp2/ptp.h b/camlibs/ptp2/ptp.h index d7f4e1561..fbd793e42 100644 --- a/camlibs/ptp2/ptp.h +++ b/camlibs/ptp2/ptp.h @@ -675,8 +675,9 @@ typedef struct _PTPIPHeader PTPIPHeader; #define PTP_EC_CANON_ExtendedErrorcode 0xC005 /* ? */ #define PTP_EC_CANON_ObjectInfoChanged 0xC008 #define PTP_EC_CANON_RequestObjectTransfer 0xC009 +#define PTP_EC_CANON_ShutterButtonPressed0 0xC00B #define PTP_EC_CANON_CameraModeChanged 0xC00C -#define PTP_EC_CANON_ShutterButtonPressed 0xC00E +#define PTP_EC_CANON_ShutterButtonPressed1 0xC00E #define PTP_EC_CANON_StartDirectTransfer 0xC011 #define PTP_EC_CANON_StopDirectTransfer 0xC013