Changeset 50cfa6c in mainline for uspace/app/tetris/screen.c
- Timestamp:
- 2009-07-14T21:25:13Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- bf5443d
- Parents:
- 7d88587
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tetris/screen.c
r7d88587 r50cfa6c 63 63 static int isset; /* true => terminal is in game mode */ 64 64 65 static int use_color; /* true => use colors */ 66 65 67 static const struct shape *lastshape; 66 68 … … 79 81 { 80 82 fflush(stdout); 81 console_set_rgb_color(fphone(stdout), 0xf0f0f0, color); 83 console_set_rgb_color(fphone(stdout), 0xf0f0f0, 84 use_color ? color : 0x000000); 82 85 } 83 86 … … 128 131 } 129 132 133 static int get_display_color_sup(void) 134 { 135 int rc; 136 int ccap; 137 138 rc = console_get_color_cap(fphone(stdout), &ccap); 139 if (rc != 0) 140 return 0; 141 142 return (ccap >= CONSOLE_CCAP_RGB); 143 } 144 130 145 /* 131 146 * Set up screen mode. … … 142 157 Cols = ws.ws_col; 143 158 } 159 160 use_color = get_display_color_sup(); 144 161 145 162 if ((Rows < MINROWS) || (Cols < MINCOLS)) {
Note:
See TracChangeset
for help on using the changeset viewer.