From a42e213912c0ecaab0948a7ffdaf68da5b779767 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Mon, 29 Oct 2018 08:39:46 +0100 Subject: [PATCH] modern PowerShot SX also behave like EOS M --- camlibs/ptp2/ptp-private.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/camlibs/ptp2/ptp-private.h b/camlibs/ptp2/ptp-private.h index 3c170446b..49544b4b4 100644 --- a/camlibs/ptp2/ptp-private.h +++ b/camlibs/ptp2/ptp-private.h @@ -115,7 +115,13 @@ is_canon_eos_m(PTPParams *params) { if (params->deviceinfo.VendorExtensionID != PTP_VENDOR_CANON) return 0; if (!ptp_operation_issupported(params, PTP_OC_CANON_EOS_SetRemoteMode)) return 0; if (!params->deviceinfo.Model) return 0; - return !strncmp(params->deviceinfo.Model, "Canon EOS M", strlen("Canon EOS M")); + /* classic EOS M */ + if (!strncmp(params->deviceinfo.Model, "Canon EOS M", strlen("Canon EOS M"))) + return 1; + /* we encountered Powershot SX models that seem to have EOS M firmware, see https://github.com/gphoto/libgphoto2/issues/316 */ + if (!strncmp(params->deviceinfo.Model, "Canon PowerShot SX", strlen("Canon PowerShot SX"))) + return 1; + return 0; }