when I put it in gui-common.c,
I get this:
$ make
[ VERSION ] ../../platform/7D.203/version.bin
[ VERSION ] ../../platform/7D.203/version.c
[ CC ] version.o
[ CC ] gui-common.o
../../src/gui-common.c: In function 'handle_common_events_by_feature':
../../src/gui-common.c:443:32: error: 'recording' undeclared (first use in this function)
if (event->param == BGMT_LV && recording)
^
../../src/gui-common.c:443:32: note: each undeclared identifier is reported only once for each function it appears in
../../Makefile.filerules:23: recipe for target 'gui-common.o' failed
make: *** [gui-common.o] Error 1
so I know I need to: int recording, but how should I do it, like this:
#if defined(CONFIG_7D)
extern int recording;
if (event->param == BGMT_LV && recording)
{
extern int movie_was_stopped_by_set;
movie_was_stopped_by_set = 1;
}
#endif
I tells me "recording" is undefined? how should gui-common know that the camera is recording?
Am I even close? I'm starting to realize that my lack of understanding how each file/part of ML talks to eachother and passes variables/ints is seriously handicapping me. Albert shih found/showed me everything I needed to get this working, but I can't seem to figure out where to put it.
Could someone point me to an example of where a custom button handler was moved from a camera specific gui.c to gui-common.c? Maybe if I can see something similar (perhaps for a different camera, or different button) then I might be able to understand and figure it out on my own?