summaryrefslogtreecommitdiff
path: root/camlibs/ptp2
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2022-01-03 10:30:12 +0100
committerMarcus Meissner <marcus@jet.franken.de>2022-01-03 10:30:12 +0100
commit07a2176e11f5601db730fe4c3bf5206c47fc1ee5 (patch)
treeaecf98494f2bece06f6acddb300e9e3b4ea7fd6a /camlibs/ptp2
parenta829e5088d0369b3db7d902d794103597f522616 (diff)
downloadlibgphoto2-07a2176e11f5601db730fe4c3bf5206c47fc1ee5.tar.gz
keep canon eos remotemode=1 on exit, to keep the display on
https://github.com/gphoto/gphoto2/issues/465
Diffstat (limited to 'camlibs/ptp2')
-rw-r--r--camlibs/ptp2/config.c3
-rw-r--r--camlibs/ptp2/library.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/camlibs/ptp2/config.c b/camlibs/ptp2/config.c
index e6dfe2c8d..8a7a3ba3d 100644
--- a/camlibs/ptp2/config.c
+++ b/camlibs/ptp2/config.c
@@ -582,7 +582,8 @@ camera_unprepare_canon_eos_capture(Camera *camera, GPContext *context) {
/* Drain the rest set of the event data */
C_PTP (ptp_check_eos_events (params));
- C_PTP (ptp_canon_eos_setremotemode(params, 0));
+ /* remotemode 1 should stay, as it keeps the display on for some reason */
+ /*C_PTP (ptp_canon_eos_setremotemode(params, 0));*/
C_PTP (ptp_canon_eos_seteventmode(params, 0));
params->eos_captureenabled = 0;
return GP_OK;
diff --git a/camlibs/ptp2/library.c b/camlibs/ptp2/library.c
index a6cd9d1e8..da7653703 100644
--- a/camlibs/ptp2/library.c
+++ b/camlibs/ptp2/library.c
@@ -3100,6 +3100,8 @@ camera_exit (Camera *camera, GPContext *context)
if ((exit_gp_result = camera_unprepare_capture (camera, context)) < GP_OK) /* note: gets gphoto resultcodes, not ptp retcodes */
goto exitfailed;
}
+ /* this switches the display back on ... */
+ C_PTP (ptp_canon_eos_setremotemode(params, 1));
break;
case PTP_VENDOR_NIKON:
if (ptp_operation_issupported(params, PTP_OC_NIKON_EndLiveView))