Kaynağa Gözat

* test/event.c:

+ Display at least two digits for keycodes.
  * configure.ac:
    + ScreenUpdate is actually mandatory for our conio driver.
tags/v0.99.beta14
Sam Hocevar sam 21 yıl önce
ebeveyn
işleme
f84194f24f
3 değiştirilmiş dosya ile 13 ekleme ve 18 silme
  1. +11
    -12
      configure.ac
  2. +0
    -4
      src/graphics.c
  3. +2
    -2
      test/event.c

+ 11
- 12
configure.ac Dosyayı Görüntüle

@@ -32,25 +32,25 @@ AC_CHECK_FUNCS(vsnprintf getenv putenv strcasecmp)
CACA_DRIVERS=""

if test "${enable_conio}" != "no"; then
ac_cv_my_have_conio="no"
AC_CHECK_HEADERS(conio.h,
[ac_cv_my_have_conio="yes"
AC_MSG_CHECKING(for ScreenUpdate in pc.h)
[AC_MSG_CHECKING(for ScreenUpdate in pc.h)
AC_EGREP_HEADER(ScreenUpdate,pc.h,
[AC_MSG_RESULT(yes)
[ac_cv_my_have_conio="yes"
AC_MSG_RESULT(yes)
AC_DEFINE(SCREENUPDATE_IN_PC_H, 1,
Define if <pc.h> defines ScreenUpdate.)],
[AC_MSG_RESULT(no)])
AC_DEFINE(USE_CONIO, 1, Define to activate the conio.h backend driver)
CACA_DRIVERS="${CACA_DRIVERS} conio"],
[ac_cv_my_have_conio="no"])
Define if <pc.h> defines ScreenUpdate.)
AC_DEFINE(USE_CONIO, 1, Define to activate the conio.h backend driver)
CACA_DRIVERS="${CACA_DRIVERS} conio"],
[AC_MSG_RESULT(no)])])
if test "${ac_cv_my_have_conio}" = "no" -a "${enable_conio}" = "yes"; then
AC_MSG_ERROR([cannot find conio.h])
fi
fi

if test "${enable_slang}" != "no"; then
ac_cv_my_have_slang="no"
AC_CHECK_HEADERS(slang.h slang/slang.h,
ac_cv_my_have_slang="no"
[AC_CHECK_LIB(slang, SLkp_init,
[ac_cv_my_have_slang="yes"
AC_DEFINE(USE_SLANG, 1, Define to activate the slang backend driver)
@@ -81,14 +81,13 @@ if test "${enable_x11}" != "no"; then
fi

if test "${enable_ncurses}" != "no"; then
ac_cv_my_have_ncurses="no"
AC_CHECK_HEADERS(ncurses.h,
[AC_CHECK_LIB(ncurses, initscr,
[ac_cv_my_have_ncurses="yes"
AC_DEFINE(USE_NCURSES, 1, Define to activate the ncurses backend driver)
CACA_LIBS="${CACA_LIBS} -lncurses"
CACA_DRIVERS="${CACA_DRIVERS} ncurses"],
[ac_cv_my_have_ncurses="no"])],
[ac_cv_my_have_ncurses="no"])
CACA_DRIVERS="${CACA_DRIVERS} ncurses"])])
if test "${ac_cv_my_have_ncurses}" = "no" -a "${enable_ncurses}" = "yes"; then
AC_MSG_ERROR([cannot find ncurses development files])
fi


+ 0
- 4
src/graphics.c Dosyayı Görüntüle

@@ -324,8 +324,6 @@ void caca_putchar(int x, int y, char c)
data = conio_screen + 2 * (x + y * _caca_width);
data[0] = c;
data[1] = (_caca_bgcolor << 4) | _caca_fgcolor;
// gotoxy(x + 1, y + 1);
// putch(c);
break;
#endif
#if defined(USE_X11)
@@ -409,8 +407,6 @@ void caca_putstr(int x, int y, char const *s)
*charbuf++ = *s++;
*charbuf++ = (_caca_bgcolor << 4) | _caca_fgcolor;
}
// gotoxy(x + 1, y + 1);
// cputs(s);
break;
#endif
#if defined(USE_X11)


+ 2
- 2
test/event.c Dosyayı Görüntüle

@@ -91,11 +91,11 @@ static void print_event(int x, int y, unsigned int event)
caca_printf(x, y, "CACA_EVENT_NONE");
break;
case CACA_EVENT_KEY_PRESS:
caca_printf(x, y, "CACA_EVENT_KEY_PRESS 0x%x",
caca_printf(x, y, "CACA_EVENT_KEY_PRESS 0x%02x",
event & 0x00ffffff);
break;
case CACA_EVENT_KEY_RELEASE:
caca_printf(x, y, "CACA_EVENT_KEY_RELEASE 0x%x",
caca_printf(x, y, "CACA_EVENT_KEY_RELEASE 0x2%x",
event & 0x00ffffff);
break;
case CACA_EVENT_MOUSE_MOTION:


Yükleniyor…
İptal
Kaydet