Subversion Repositories HelenOS

Rev

Rev 4345 | Rev 4348 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4345 Rev 4347
Line 56... Line 56...
56
#include "input.h"
56
#include "input.h"
57
#include "tetris.h"
57
#include "tetris.h"
58
 
58
 
59
#include <async.h>
59
#include <async.h>
60
#include <ipc/console.h>
60
#include <ipc/console.h>
-
 
61
#include <console.h>
61
#include <kbd/kbd.h>
62
#include <kbd/kbd.h>
62
 
63
 
63
/* return true iff the given timeval is positive */
64
/* return true iff the given timeval is positive */
64
#define TV_POS(tv) \
65
#define TV_POS(tv) \
65
    ((tv)->tv_sec > 0 || ((tv)->tv_sec == 0 && (tv)->tv_usec > 0))
66
    ((tv)->tv_sec > 0 || ((tv)->tv_sec == 0 && (tv)->tv_usec > 0))
Line 112... Line 113...
112
        s = NULL;
113
        s = NULL;
113
 
114
 
114
    if (!lastchar) {
115
    if (!lastchar) {
115
again:
116
again:
116
        if (!getchar_inprog) {
117
        if (!getchar_inprog) {
117
            cons_phone = get_console_phone();
118
            cons_phone = console_phone_get(true);
118
            getchar_inprog = async_send_2(cons_phone,
119
            getchar_inprog = async_send_2(cons_phone,
119
                CONSOLE_GETKEY, 0, 0, &charcall);
120
                CONSOLE_GETKEY, 0, 0, &charcall);
120
        }
121
        }
121
        if (!s)
122
        if (!s)
122
            async_wait_for(getchar_inprog, &rc);
123
            async_wait_for(getchar_inprog, &rc);