Ignore:
Timestamp:
Jan 8, 2004, 11:22:14 AM (19 years ago)
Author:
Sam Hocevar
Message:
  • src/io.c: + Use SLkp_getkey instead of SLang_getkey so that escape sequences are

directly interpreted.

+ Major rehandling of the event code. All output drivers are now

correctly separated.

  • src/graphics.c: + Fixed a compilation warning.
  • test/event.c: + More human-readable event printing.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/test/event.c

    r324 r329  
    9292        break;
    9393    case CACA_EVENT_KEY_PRESS:
    94         caca_printf(x, y, "CACA_EVENT_KEY_PRESS 0x%06x",
     94        caca_printf(x, y, "CACA_EVENT_KEY_PRESS 0x%x",
    9595                    event & 0x00ffffff);
    9696        break;
    9797    case CACA_EVENT_KEY_RELEASE:
    98         caca_printf(x, y, "CACA_EVENT_KEY_RELEASE 0x%06x",
     98        caca_printf(x, y, "CACA_EVENT_KEY_RELEASE 0x%x",
    9999                    event & 0x00ffffff);
    100100        break;
    101101    case CACA_EVENT_MOUSE_MOTION:
    102         caca_printf(x, y, "CACA_EVENT_MOUSE_MOTION 0x%03x 0x%03x",
     102        caca_printf(x, y, "CACA_EVENT_MOUSE_MOTION %u %u",
    103103                    (event & 0x00fff000) >> 12, event & 0x00000fff);
    104104        break;
    105105    case CACA_EVENT_MOUSE_PRESS:
    106         caca_printf(x, y, "CACA_EVENT_MOUSE_PRESS 0x%06x",
     106        caca_printf(x, y, "CACA_EVENT_MOUSE_PRESS %u",
    107107                    event & 0x00ffffff);
    108108        break;
    109109    case CACA_EVENT_MOUSE_RELEASE:
    110         caca_printf(x, y, "CACA_EVENT_MOUSE_RELEASE 0x%06x",
     110        caca_printf(x, y, "CACA_EVENT_MOUSE_RELEASE %u",
    111111                    event & 0x00ffffff);
    112112        break;
Note: See TracChangeset for help on using the changeset viewer.