I've take the liberty to update your patch a bit. Two principal changes are :
1) Added code to support the function in uBASIC (with a test script).
2) Added an enum for the OSD state. I get nervous when code has "magic numbers" like 0,1,2 rather than #defined (or enum) constants - especially when the same magic numbers are used in different source files.
If you are okay with these changes, and lacking any other feedback, I'd suggest submitting this patch for inclusion in the 1.3.0 trunk.
Wow, great work! Actually, I was just ready to post my V3 patch, which included the uBasic changes and a uBasic test script. I'm happy to report that except for the enum part, we ended up with the exact same code, and same test script.
I'm OK with the enum changes, if you think that makes it more clear.
Update : I almost hate to bring this up, but would it be better to extend this so that you can selectively turn off the <ALT> & script name and/or the OSD icons. For example, I can see wanting the colored battery icon visible but nothing else. Or am I complicating this too much?
I thought about doing that, but I decided it wasn't that useful. My time lapse script uses the toggle feature when you press <SET>, so I can see the entire OSD briefly whenever I want, including the battery, for example.
I also show the battery voltage using drawstring() from my script. I figure anything the script wants to show, it can show on its own with the draw functions, exactly the way it wants. The idea of hide_osd() is to give total control of the screen to the script.
I compiled and tested your patch in uBasic and Lua, and it works great. Thanks again.
Update 2 : added the new uBASIC function to camera_functions.c and fixed a path error in run_ubasic.c .
I suspect run_ubasic.c will still not build "as is" with the new modules versions of CHDK unless further work is done. This has nothing to do with the hide_osd() patch. Does anybody actually care anymore?
I'm not familiar with this, so I'll let you sort it out, OK? Will you submit the patch for inclusion in 1.3 when you have it ready?
Thanks.