Przeglądaj źródła

Implement conio.h's getche() and move cursor to top right corner after

a call to clrscr().
tags/v0.99.beta17
Sam Hocevar sam 16 lat temu
rodzic
commit
9ee841240f
1 zmienionych plików z 6 dodań i 4 usunięć
  1. +6
    -4
      caca/caca_conio.c

+ 6
- 4
caca/caca_conio.c Wyświetl plik

@@ -65,6 +65,7 @@ void caca_conio_clrscr(void)
conio_init(); conio_init();


caca_clear_canvas(cv); caca_clear_canvas(cv);
caca_gotoxy(cv, 0, 0);


conio_refresh(); conio_refresh();
} }
@@ -152,11 +153,12 @@ int caca_conio_getch(void)
/** \brief DOS conio.h getche() equivalent */ /** \brief DOS conio.h getche() equivalent */
int caca_conio_getche(void) int caca_conio_getche(void)
{ {
conio_init();

/* TODO: implement this function */
/* conio_init() is called here. */
int tmp = caca_conio_getch();
/* conio_refresh() is called here. */
caca_conio_printf("%c", tmp);


return 0;
return tmp;
} }


/** \brief DOS conio.h getpass() equivalent */ /** \brief DOS conio.h getpass() equivalent */


Ładowanie…
Anuluj
Zapisz