Changeset ebb1489 in mainline for uspace/app/tetris/screen.c


Ignore:
Timestamp:
2024-10-13T08:23:40Z (8 weeks ago)
Author:
GitHub <noreply@…>
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)
Message:

Merge branch 'HelenOS:master' into topic/packet-capture

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/tetris/screen.c

    r2a0c827c rebb1489  
    11/*
     2 * Copyright (c) 2024 Jiri Svoboda
    23 * Copyright (c) 2011 Martin Decky
    34 * All rights reserved.
     
    7980static usec_t timeleft = 0;
    8081
     82bool size_changed;
    8183console_ctrl_t *console;
    8284
     
    142144        console_cursor_visibility(console, 0);
    143145        resume_normal();
    144         scr_clear();
     146        scr_set();
    145147}
    146148
     
    169171        }
    170172
     173        if ((ccap & CONSOLE_CAP_CURSORCTL) == 0) {
     174                stop("Your screen does not support cursor control.\n");
     175                return;
     176        }
    171177        *rgb = ((ccap & CONSOLE_CAP_RGB) == CONSOLE_CAP_RGB);
    172178        *color = ((ccap & CONSOLE_CAP_INDEXED) == CONSOLE_CAP_INDEXED);
     
    194200
    195201                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",
    197203                    MINROWS, MINCOLS);
    198204                stop(smallscr);
     
    217223
    218224        fprintf(stderr, "aborting: %s", why);
    219         abort();
     225        exit(1);
    220226}
    221227
     
    410416                        exit(1);
    411417
     418                if (event.type == CEV_RESIZE)
     419                        size_changed = true;
     420
    412421                if (event.type == CEV_KEY && event.ev.key.type == KEY_PRESS)
    413422                        c = event.ev.key.c;
Note: See TracChangeset for help on using the changeset viewer.