mirror of
https://github.com/Tha14/toxic.git
synced 2026-01-27 06:43:15 +01:00
Fixed v4l2 capture crash, and refactored to prepare for new features
This commit is contained in:
25
src/help.c
25
src/help.c
@@ -167,6 +167,15 @@ static void help_draw_global(ToxWindow *self)
|
||||
wprintw(win, " /sdev <type> <id> : Set active device\n");
|
||||
#endif /* AUDIO */
|
||||
|
||||
#ifdef VIDEO
|
||||
wattron(win, A_BOLD);
|
||||
wprintw(win, "\n Video:\n");
|
||||
wattroff(win, A_BOLD);
|
||||
|
||||
wprintw(win, " /lsvdev <type> : List video devices where type: in|out\n");
|
||||
wprintw(win, " /svdev <type> <id> : Set active video device\n");
|
||||
#endif /* VIDEO */
|
||||
|
||||
help_draw_bottom_menu(win);
|
||||
|
||||
box(win, ACS_VLINE, ACS_HLINE);
|
||||
@@ -203,6 +212,14 @@ static void help_draw_chat(ToxWindow *self)
|
||||
wprintw(win, " /sense <n> : VAD sensitivity threshold\n");
|
||||
#endif /* AUDIO */
|
||||
|
||||
#ifdef VIDEO
|
||||
wattron(win, A_BOLD);
|
||||
wprintw(win, "\n Video:\n");
|
||||
wattroff(win, A_BOLD);
|
||||
wprintw(win, " /video : Send video capture\n");
|
||||
wprintw(win, " /endvideo : Close all video windows\n");
|
||||
#endif /* VIDEO */
|
||||
|
||||
help_draw_bottom_menu(win);
|
||||
|
||||
box(win, ACS_VLINE, ACS_HLINE);
|
||||
@@ -282,7 +299,9 @@ void help_onKey(ToxWindow *self, wint_t key)
|
||||
break;
|
||||
|
||||
case 'c':
|
||||
#ifdef AUDIO
|
||||
#ifdef VIDEO
|
||||
help_init_window(self, 23, 80);
|
||||
#elif AUDIO
|
||||
help_init_window(self, 19, 80);
|
||||
#else
|
||||
help_init_window(self, 9, 80);
|
||||
@@ -291,7 +310,9 @@ void help_onKey(ToxWindow *self, wint_t key)
|
||||
break;
|
||||
|
||||
case 'g':
|
||||
#ifdef AUDIO
|
||||
#ifdef VIDEO
|
||||
help_init_window(self, 28, 80);
|
||||
#elif AUDIO
|
||||
help_init_window(self, 24, 80);
|
||||
#else
|
||||
help_init_window(self, 20, 80);
|
||||
|
||||
Reference in New Issue
Block a user