Changeset 0c25c10 in mainline for uspace/app/tetris/input.c


Ignore:
Timestamp:
2009-06-03T19:32:07Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
69e68e3
Parents:
cbff4c2
Message:

update for latest I/O changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/tetris/input.c

    rcbff4c2 r0c25c10  
    5858
    5959#include <async.h>
     60#include <vfs/vfs.h>
     61#include <io/console.h>
    6062#include <ipc/console.h>
    61 #include <console.h>
    62 #include <kbd/kbd.h>
    6363
    6464/* return true iff the given timeval is positive */
     
    9999        static ipc_call_t charcall;
    100100        ipcarg_t rc;
    101         int cons_phone;
    102101
    103102        /*
     
    116115again:
    117116                if (!getchar_inprog) {
    118                         cons_phone = console_open(true);
    119                         getchar_inprog = async_send_2(cons_phone,
    120                             CONSOLE_GETKEY, 0, 0, &charcall);
     117                        getchar_inprog = async_send_0(fphone(stdin),
     118                            CONSOLE_GET_EVENT, &charcall);
    121119                }
    122                 if (!s) 
     120                if (!s)
    123121                        async_wait_for(getchar_inprog, &rc);
    124122                else if (async_wait_timeout(getchar_inprog, &rc, s->tv_usec) == ETIMEOUT) {
     
    131129                        stop("end of file, help");
    132130                }
    133                 if (IPC_GET_ARG1(charcall) == KE_RELEASE)
     131                if (IPC_GET_ARG1(charcall) == KEY_RELEASE)
    134132                        goto again;
    135133
Note: See TracChangeset for help on using the changeset viewer.