Changes in uspace/app/tetris/scores.c [07b7c48:79ae36dd] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tetris/scores.c
r07b7c48 r79ae36dd 125 125 int j; 126 126 size_t off; 127 cons_event_t ev; 128 kbd_event_t *kev; 127 kbd_event_t ev; 129 128 130 129 clear_screen(); … … 142 141 while (1) { 143 142 console_flush(console); 144 if (!console_get_ event(console, &ev))143 if (!console_get_kbd_event(console, &ev)) 145 144 exit(1); 146 145 147 if (ev.type != CEV_KEY || ev.ev.key.type== KEY_RELEASE)146 if (ev.type == KEY_RELEASE) 148 147 continue; 149 148 150 kev = &ev.ev.key; 151 152 if (kev->key == KC_ENTER || kev->key == KC_NENTER) 149 if (ev.key == KC_ENTER || ev.key == KC_NENTER) 153 150 break; 154 151 155 if ( kev->key == KC_BACKSPACE) {152 if (ev.key == KC_BACKSPACE) { 156 153 if (i > 0) { 157 154 wchar_t uc; … … 169 166 scores[NUMSPOTS - 1].hs_name[off] = '\0'; 170 167 } 171 } else if ( kev->c != '\0') {168 } else if (ev.c != '\0') { 172 169 if (i < (MAXLOGNAME - 1)) { 173 if (chr_encode( kev->c, scores[NUMSPOTS - 1].hs_name,170 if (chr_encode(ev.c, scores[NUMSPOTS - 1].hs_name, 174 171 &off, STR_BOUNDS(MAXLOGNAME) + 1) == EOK) { 175 172 ++i;
Note:
See TracChangeset
for help on using the changeset viewer.