From 5f88308f865bf6db528e171962400a72723eae67 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sat, 30 Sep 2023 18:20:16 +0200 Subject: [PATCH] better leica detection mode https://github.com/gphoto/gphoto2/issues/601 --- camlibs/ptp2/library.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/camlibs/ptp2/library.c b/camlibs/ptp2/library.c index e8489c1576..f3f6ad6fb8 100644 --- a/camlibs/ptp2/library.c +++ b/camlibs/ptp2/library.c @@ -276,7 +276,7 @@ fixup_cached_deviceinfo (Camera *camera, PTPDeviceInfo *di) { } /* LEICA */ - if ( (di->VendorExtensionID == PTP_VENDOR_MICROSOFT) && + if ( ((!di->VendorExtensionID) || (di->VendorExtensionID == PTP_VENDOR_MICROSOFT)) && (camera->port->type == GP_PORT_USB) && (a.usb_vendor == 0x1a98) ) { @@ -2791,7 +2791,7 @@ static struct { {"Leica:M9", 0x1a98, 0x0002, PTP_CAP}, /* https://github.com/gphoto/gphoto2/issues/601 */ - {"Leica:Q3", 0x1a98, 0x2376, 0}, /* checking for PTP_CAP */ + {"Leica:Q3", 0x1a98, 0x2376, PTP_CAP|PTP_CAP_PREVIEW}, /* Christopher Kao */ {"Leica:SL (Typ 601)", 0x1a98, 0x2041, PTP_CAP|PTP_CAP_PREVIEW},