It seems masking out the 1024 in mode_get should be generally OK, both for recording in still, and ones that change VIDEO_STD. That would make it return the actual mode value, which seems correct. This might be the thing to do for 1.4, the risk of unforeseen side effects seems high for 1.3.
I've spent some time studying this - looking for possible side effects. There are of course several.
Attached is a spreadsheet analysis of all the
CapturemodeMap modemap[] values currently defined.
If we mask the Canon mode value from
PROPCASE_SHOOTING_MODE used in core/shooting.c/mode_get() with ~0x400 (so that the reported mode value does not change when cameras with a video button start recording), then only eleven cameras are potentially affected. The change will have no effect for cameras without video buttons. It will also change nothing for 35 of the cameras that do have video buttons (other than letting
mode_get() return the actual current mode).
That leaves nine cameras that could perform differently if this patch is made. These are :
A1300, A810, ixus132_elph115, ixus135_elph120, N, N_Facebook, sx1, sx10, tx1.
The a420 and a430 might also be affected but they do not have a video button so I suspect their definitions for MODE_VIDEO_STD are wrong.
If we just apply the attached patch (works on 1.3.0 and 1.4.0) then everything seems to work for all cameras (specifically the USB remote bug srsa_4c originally noticed). The MODE_VIDEO_STD defines for the 11 cameras will simply be ignored as will the extra mode definition used by the TX1. This might be a problem for the A1300, which does not appear to have a video mode other than that involved by pressing the video button. So
camera_info.state.mode_video = mode_is_video(mode);
will never be true for that camera. Perhaps that makes sense as it does not have a video mode technically?
Conclusion : masking the 0x0400 bit in PROPCASE_SHOOTING_MODE will have minimal possible side effects and will fix a glaring hole for cameras with video buttons whereby their mode is reported as NULL when video recording is in progress.
Edit : tested on the S100 and Powershot N to confirm this "fixes" the original error reported by srsa_4c.