I'm trying to add something to the OSD and reading the source I supose I have to add my drawings to gui_osd_draw() in core/gui_osd.c. So What I did:
- I've changed gui_osd_draw() function as follows:
void gui_osd_draw() {
if (osd_to_draw) {
int i;
draw_restore();
gui_draw_something(); // <-- here's my function
gui_osd_draw_histo();
gui_osd_draw_dof();
gui_batt_draw_osd();
gui_space_draw_osd();
gui_osd_draw_state();
gui_osd_draw_raw_info();
...
... and so on ...
- I've added apropriate drawing at the end of the same file:
void gui_draw_something() {
draw_line(1,1,100,100,conf.osd_color);
}
- also exported in gui_osd.h:
extern void gui_draw_something();
The whole code compiles without any errors and warnings but seems to be not working. There's no new line on the screen.
Testing the drawings before I tried to add a lua function for drawing a line just by calling "draw_line" function from luascript.c (of course with all includes and so on) and it worked very well. So I am pretty sure that I 'can' draw, but I'm doing something wrong while I try to draw from gui_osd()...
What's wrong?!