Changeset 0c25c10 in mainline for uspace/app/tetris/input.c
- Timestamp:
- 2009-06-03T19:32:07Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 69e68e3
- Parents:
- cbff4c2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tetris/input.c
rcbff4c2 r0c25c10 58 58 59 59 #include <async.h> 60 #include <vfs/vfs.h> 61 #include <io/console.h> 60 62 #include <ipc/console.h> 61 #include <console.h>62 #include <kbd/kbd.h>63 63 64 64 /* return true iff the given timeval is positive */ … … 99 99 static ipc_call_t charcall; 100 100 ipcarg_t rc; 101 int cons_phone;102 101 103 102 /* … … 116 115 again: 117 116 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); 121 119 } 122 if (!s) 120 if (!s) 123 121 async_wait_for(getchar_inprog, &rc); 124 122 else if (async_wait_timeout(getchar_inprog, &rc, s->tv_usec) == ETIMEOUT) { … … 131 129 stop("end of file, help"); 132 130 } 133 if (IPC_GET_ARG1(charcall) == KE _RELEASE)131 if (IPC_GET_ARG1(charcall) == KEY_RELEASE) 134 132 goto again; 135 133
Note:
See TracChangeset
for help on using the changeset viewer.