Changeset c1d2c9d in mainline for fb/fb.c


Ignore:
Timestamp:
2006-06-01T21:51:35Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
da0c91e7
Parents:
3993b3d
Message:

Added integration of console & fb.
Added ipc_call_async_3 call.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fb/fb.c

    r3993b3d rc1d2c9d  
    269269
    270270/** Invert character at given position */
    271 static void invert_char(int vp,unsigned int col, unsigned int row)
     271static void invert_char(int vp,unsigned int row, unsigned int col)
    272272{
    273273        unsigned int x;
     
    334334        viewports[i].fgcolor = DEFAULT_FGCOLOR;
    335335       
     336        viewports[i].cur_col = 0;
     337        viewports[i].cur_row = 0;
     338        viewports[i].cursor_active = 0;
     339
    336340        viewports[i].initialized = 1;
    337341
     
    416420}
    417421
    418 static void draw_char(int vp, char c, unsigned int col, unsigned int row)
     422static void draw_char(int vp, char c, unsigned int row, unsigned int col)
    419423{
    420424        viewport_t *vport = &viewports[vp];
    421425
    422426        if (vport->cursor_active && (vport->cur_col != col || vport->cur_row != row))
    423                 invert_char(vp, vport->cur_col,vport->cur_row);
    424        
    425         draw_glyph(vp, c, col, row);
    426        
    427         if (vport->cursor_active) {
    428                 vport->cur_col++;
    429                 if (vport->cur_col>= vport->cols) {
    430                         vport->cur_col = 0;
    431                         vport->cur_row++;
    432                         if (vport->cur_row >= vport->rows)
    433                                 vport->cur_row--;
    434                 }
    435                 invert_char(vp, vport->cur_col,vport->cur_row);
     427                invert_char(vp, vport->cur_row, vport->cur_col);
     428       
     429        draw_glyph(vp, c, row, col);
     430
     431        vport->cur_col = col;
     432        vport->cur_row = row;
     433
     434        vport->cur_col++;
     435        if (vport->cur_col>= vport->cols) {
     436                vport->cur_col = 0;
     437                vport->cur_row++;
     438                if (vport->cur_row >= vport->rows)
     439                        vport->cur_row--;
    436440        }
     441        if (vport->cursor_active)
     442                invert_char(vp, vport->cur_row, vport->cur_col);
    437443}
    438444
     
    481487                        clear_port(vp);
    482488                        if (vport->cursor_active)
    483                                 invert_char(vp, vport->cur_col,vport->cur_row);
     489                                invert_char(vp, vport->cur_row, vport->cur_col);
    484490                        retval = 0;
    485491                        break;
     
    493499                        retval = 0;
    494500                        if (viewports[vp].cursor_active) {
    495                                 invert_char(vp, vport->cur_col,vport->cur_row);
    496                                 invert_char(vp, col, row);
     501                                invert_char(vp, vport->cur_row, vport->cur_col);
     502                                invert_char(vp, row, col);
    497503                        }
    498504                        vport->cur_col = col;
     
    506512
    507513                        vport->cursor_active = i;
    508                         invert_char(vp, vport->cur_col,vport->cur_row);
     514                        invert_char(vp, vport->cur_row, vport->cur_col);
    509515                        break;
    510516                case FB_GET_CSIZE:
     
    518524                        }
    519525                        if (vport->cursor_active)
    520                                 invert_char(vp, vport->cur_col,vport->cur_row);
     526                                invert_char(vp, vport->cur_row, vport->cur_col);
    521527                        scroll_port(vp, i);
    522528                        if (vport->cursor_active)
    523                                 invert_char(vp, vport->cur_col,vport->cur_row);
     529                                invert_char(vp, vport->cur_row, vport->cur_col);
    524530                        retval = 0;
    525531                        break;
Note: See TracChangeset for help on using the changeset viewer.