Changeset ebb1489 in mainline for uspace/app/tetris/screen.c
- Timestamp:
- 2024-10-13T08:23:40Z (8 weeks ago)
- Children:
- 0472cf17
- Parents:
- 2a0c827c (diff), b3b79981 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- boba-buba <120932204+boba-buba@…> (2024-10-13 08:23:40)
- git-committer:
- GitHub <noreply@…> (2024-10-13 08:23:40)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tetris/screen.c
r2a0c827c rebb1489 1 1 /* 2 * Copyright (c) 2024 Jiri Svoboda 2 3 * Copyright (c) 2011 Martin Decky 3 4 * All rights reserved. … … 79 80 static usec_t timeleft = 0; 80 81 82 bool size_changed; 81 83 console_ctrl_t *console; 82 84 … … 142 144 console_cursor_visibility(console, 0); 143 145 resume_normal(); 144 scr_ clear();146 scr_set(); 145 147 } 146 148 … … 169 171 } 170 172 173 if ((ccap & CONSOLE_CAP_CURSORCTL) == 0) { 174 stop("Your screen does not support cursor control.\n"); 175 return; 176 } 171 177 *rgb = ((ccap & CONSOLE_CAP_RGB) == CONSOLE_CAP_RGB); 172 178 *color = ((ccap & CONSOLE_CAP_INDEXED) == CONSOLE_CAP_INDEXED); … … 194 200 195 201 snprintf(smallscr, sizeof(smallscr), 196 "the screen is too small (must be at least %dx%d) ",202 "the screen is too small (must be at least %dx%d)\n", 197 203 MINROWS, MINCOLS); 198 204 stop(smallscr); … … 217 223 218 224 fprintf(stderr, "aborting: %s", why); 219 abort();225 exit(1); 220 226 } 221 227 … … 410 416 exit(1); 411 417 418 if (event.type == CEV_RESIZE) 419 size_changed = true; 420 412 421 if (event.type == CEV_KEY && event.ev.key.type == KEY_PRESS) 413 422 c = event.ev.key.c;
Note:
See TracChangeset
for help on using the changeset viewer.