Changeset 2ee6351 in mainline
- Timestamp:
- 2024-09-12T12:35:23Z (3 months ago)
- Branches:
- master
- Children:
- dd50aa19
- Parents:
- 9c40b834
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2024-08-20 14:21:37)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2024-09-12 12:35:23)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/terminal/terminal.c
r9c40b834 r2ee6351 215 215 216 216 static void term_update_char(terminal_t *term, pixelmap_t *pixelmap, 217 sysarg_t sx, sysarg_t sy, sysarg_tcol, sysarg_t row)217 sysarg_t col, sysarg_t row) 218 218 { 219 219 charfield_t *field = … … 222 222 bool inverted = chargrid_cursor_at(term->backbuf, col, row); 223 223 224 sysarg_t bx = sx + (col * FONT_WIDTH);225 sysarg_t by = sy + (row * FONT_SCANLINES);224 sysarg_t bx = col * FONT_WIDTH; 225 sysarg_t by = row * FONT_SCANLINES; 226 226 227 227 pixel_t bgcolor = 0; … … 251 251 } 252 252 253 static bool term_update_scroll(terminal_t *term, pixelmap_t *pixelmap, 254 sysarg_t sx, sysarg_t sy) 253 static bool term_update_scroll(terminal_t *term, pixelmap_t *pixelmap) 255 254 { 256 255 sysarg_t top_row = chargrid_get_top_row(term->frontbuf); … … 283 282 284 283 if (update) { 285 term_update_char(term, pixelmap, sx, sy,col, row);284 term_update_char(term, pixelmap, col, row); 286 285 } 287 286 } … … 291 290 } 292 291 293 static bool term_update_cursor(terminal_t *term, pixelmap_t *pixelmap, 294 sysarg_t sx, sysarg_t sy) 292 static bool term_update_cursor(terminal_t *term, pixelmap_t *pixelmap) 295 293 { 296 294 bool update = false; … … 313 311 chargrid_set_cursor_visibility(term->backbuf, 314 312 front_visibility); 315 term_update_char(term, pixelmap, sx, sy,back_col, back_row);313 term_update_char(term, pixelmap, back_col, back_row); 316 314 update = true; 317 315 } … … 319 317 if ((front_col != back_col) || (front_row != back_row)) { 320 318 chargrid_set_cursor(term->backbuf, front_col, front_row); 321 term_update_char(term, pixelmap, sx, sy,back_col, back_row);322 term_update_char(term, pixelmap, sx, sy,front_col, front_row);319 term_update_char(term, pixelmap, back_col, back_row); 320 term_update_char(term, pixelmap, front_col, front_row); 323 321 update = true; 324 322 } … … 345 343 346 344 bool update = false; 347 sysarg_t sx = 0; 348 sysarg_t sy = 0; 349 350 if (term_update_scroll(term, &pixelmap, sx, sy)) { 345 346 if (term_update_scroll(term, &pixelmap)) { 351 347 update = true; 352 348 } else { … … 376 372 377 373 if (cupdate) { 378 term_update_char(term, &pixelmap, sx, sy,x, y);374 term_update_char(term, &pixelmap, x, y); 379 375 update = true; 380 376 } … … 383 379 } 384 380 385 if (term_update_cursor(term, &pixelmap , sx, sy))381 if (term_update_cursor(term, &pixelmap)) 386 382 update = true; 387 383 … … 418 414 pixelmap.data = alloc.pixels; 419 415 420 sysarg_t sx = 0; 421 sysarg_t sy = 0; 422 423 if (!term_update_scroll(term, &pixelmap, sx, sy)) { 416 if (!term_update_scroll(term, &pixelmap)) { 424 417 for (sysarg_t y = 0; y < term->rows; y++) { 425 418 for (sysarg_t x = 0; x < term->cols; x++) { … … 433 426 front_field->flags &= ~CHAR_FLAG_DIRTY; 434 427 435 term_update_char(term, &pixelmap, sx, sy,x, y);428 term_update_char(term, &pixelmap, x, y); 436 429 } 437 430 } 438 431 } 439 432 440 term_update_cursor(term, &pixelmap , sx, sy);433 term_update_cursor(term, &pixelmap); 441 434 442 435 fibril_mutex_unlock(&term->mtx);
Note:
See TracChangeset
for help on using the changeset viewer.