Changeset 09f41d3 in mainline for uspace/app/tetris/screen.c


Ignore:
Timestamp:
2024-09-25T17:19:36Z (6 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
c23a1fe
Parents:
6a753a9c
Message:

Tetris should be able to detect screen cursor control capability

File:
1 edited

Legend:

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

    r6a753a9c r09f41d3  
    11/*
     2 * Copyright (c) 2024 Jiri Svoboda
    23 * Copyright (c) 2011 Martin Decky
    34 * All rights reserved.
     
    143144        console_cursor_visibility(console, 0);
    144145        resume_normal();
    145         scr_clear();
     146        scr_set();
    146147}
    147148
     
    170171        }
    171172
     173        if ((ccap & CONSOLE_CAP_CURSORCTL) == 0) {
     174                stop("Your screen does not support cursor control.\n");
     175                return;
     176        }
    172177        *rgb = ((ccap & CONSOLE_CAP_RGB) == CONSOLE_CAP_RGB);
    173178        *color = ((ccap & CONSOLE_CAP_INDEXED) == CONSOLE_CAP_INDEXED);
     
    195200
    196201                snprintf(smallscr, sizeof(smallscr),
    197                     "the screen is too small (must be at least %dx%d)",
     202                    "the screen is too small (must be at least %dx%d)\n",
    198203                    MINROWS, MINCOLS);
    199204                stop(smallscr);
Note: See TracChangeset for help on using the changeset viewer.