Changeset e3e64f6 in mainline
- Timestamp:
- 2021-11-04T16:36:15Z (3 years ago)
- Branches:
- master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f0155e4
- Parents:
- bad765a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ui/src/ui.c
rbad765a re3e64f6 399 399 errno_t rc; 400 400 ui_window_t *awnd; 401 sysarg_t col; 402 sysarg_t row; 403 cons_event_t ev; 401 404 402 405 if (ui->cgc == NULL) 403 406 return EOK; 407 408 rc = console_get_pos(ui->console, &col, &row); 409 if (rc != EOK) 410 return rc; 411 412 /* 413 * Here's a little heuristic to help determine if we need 414 * to pause before returning to the UI. If we are in the 415 * top-left corner, chances are the screen is empty and 416 * there is no need to pause. 417 */ 418 if (col != 0 || row != 0) { 419 printf("Press any key or button to continue...\n"); 420 421 while (true) { 422 rc = console_get_event(ui->console, &ev); 423 if (rc != EOK) 424 return EIO; 425 426 if (ev.type == CEV_KEY && ev.ev.key.type == KEY_PRESS) 427 break; 428 429 if (ev.type == CEV_POS && ev.ev.pos.type == POS_PRESS) 430 break; 431 } 432 } 404 433 405 434 rc = console_gc_resume(ui->cgc);
Note:
See TracChangeset
for help on using the changeset viewer.