Ignore:
Timestamp:
Mar 23, 2006, 7:36:59 PM (14 years ago)
Author:
Sam Hocevar
Message:
  • Massive rework of the event handling code, as per the TODO list.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/src/cacaplas.c

    r677 r681  
    8181    for(;;)
    8282    {
    83         switch(caca_get_event(kk, CACA_EVENT_KEY_PRESS))
     83        struct caca_event ev;
     84        if(caca_get_event(kk, CACA_EVENT_KEY_PRESS, &ev))
    8485        {
    85             case CACA_EVENT_KEY_PRESS | CACA_KEY_ESCAPE: goto end;
    86             case CACA_EVENT_KEY_PRESS | ' ': pause = !pause;
     86            switch(ev.data.key.c)
     87            {
     88                case CACA_KEY_ESCAPE: goto end;
     89                case ' ': pause = !pause;
     90            }
    8791        }
    8892
Note: See TracChangeset for help on using the changeset viewer.