Changeset 76fca31 in mainline for uspace/srv/console/gcons.c


Ignore:
Timestamp:
2008-12-16T19:02:07Z (16 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5ae4443
Parents:
8fe5980
Message:

kconsole is optional
kernel & uspace framebuffer rewrite with speedups (some things are slightly broken yet)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/console/gcons.c

    r8fe5980 r76fca31  
    8282static void vp_switch(int vp)
    8383{
    84         async_msg_1(fbphone,FB_VIEWPORT_SWITCH, vp);
     84        async_msg_1(fbphone, FB_VIEWPORT_SWITCH, vp);
    8585}
    8686
     
    106106static void tran_putch(char c, int row, int col)
    107107{
    108         async_msg_3(fbphone, FB_TRANS_PUTCHAR, c, row, col);
     108        async_msg_3(fbphone, FB_PUTCHAR, c, row, col);
    109109}
    110110
     
    190190        else
    191191                console_state[consnum] = CONS_DISCONNECTED;
    192 
     192       
    193193        if (active_console == KERNEL_CONSOLE)
    194194                return;
    195 
     195       
    196196        redraw_state(consnum);
    197197        vp_switch(console_vp);
     
    218218void gcons_in_kernel(void)
    219219{
    220         if (console_state[active_console] == CONS_DISCONNECTED_SEL)
    221                 console_state[active_console] = CONS_DISCONNECTED;
    222         else
    223                 console_state[active_console] = CONS_IDLE;
    224         redraw_state(active_console);
    225 
    226220        if (animation != -1)
    227221                async_msg_1(fbphone, FB_ANIM_STOP, animation);
    228 
    229         active_console = KERNEL_CONSOLE; /* Set to kernel console */
     222       
     223        active_console = KERNEL_CONSOLE;
    230224        vp_switch(0);
    231225}
     
    343337extern char _binary_nameic_ppm_start[0];
    344338extern int _binary_nameic_ppm_size;
    345 /** Redraws console graphics  */
    346 static void gcons_redraw_console(void)
     339
     340/** Redraws console graphics */
     341void gcons_redraw_console(void)
    347342{
    348343        int i;
    349 
     344       
    350345        if (!use_gcons)
    351346                return;
     
    358353        draw_pixmap(_binary_nameic_ppm_start,
    359354            (size_t) &_binary_nameic_ppm_size, 5, 17);
    360 
     355       
    361356        for (i = 0; i < CONSOLE_COUNT; i++)
    362357                redraw_state(i);
     
    460455        int i;
    461456        int status_start = STATUS_START;
    462 
     457       
    463458        fbphone = phone;
    464 
     459       
    465460        rc = async_req_0_2(phone, FB_GET_RESOLUTION, &xres, &yres);
    466461        if (rc)
    467462                return;
    468463       
    469         if (xres < 800 || yres < 600)
    470                 return;
    471 
     464        if ((xres < 800) || (yres < 600))
     465                return;
     466       
    472467        /* create console viewport */
    473468        /* Align width & height to character size */
     
    507502       
    508503        make_anim();
    509 
     504       
    510505        use_gcons = 1;
    511506        console_state[0] = CONS_DISCONNECTED_SEL;
     
    513508        gcons_redraw_console();
    514509}
    515  
     510
    516511/** @}
    517512 */
    518 
Note: See TracChangeset for help on using the changeset viewer.