Changeset e1f2079 in mainline for uspace/srv/hid/display/display.c


Ignore:
Timestamp:
2020-02-14T19:54:40Z (5 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b0a94854
Parents:
b252e87
Message:

Get display resolution by querying display device

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/display/display.c

    rb252e87 re1f2079  
    384384        assert(!link_used(&ddev->lddevs));
    385385
     386        /* Set display dimensions to dimensions of first display device */
     387        if (gfx_rect_is_empty(&disp->rect))
     388                disp->rect = ddev->info.rect;
     389
    386390        ddev->display = disp;
    387391        list_append(&ddev->lddevs, &disp->ddevs);
     
    447451errno_t ds_display_paint_bg(ds_display_t *disp, gfx_rect_t *rect)
    448452{
    449         gfx_rect_t dsrect;
    450453        gfx_rect_t crect;
    451454        gfx_context_t *gc;
    452455        errno_t rc;
    453456
    454         dsrect.p0.x = 0;
    455         dsrect.p0.y = 0;
    456         dsrect.p1.x = 1024;
    457         dsrect.p1.y = 768;
    458 
    459457        if (rect != NULL)
    460                 gfx_rect_clip(&dsrect, rect, &crect);
     458                gfx_rect_clip(&disp->rect, rect, &crect);
    461459        else
    462                 crect = dsrect;
     460                crect = disp->rect;
    463461
    464462        gc = ds_display_get_gc(disp); // XXX
Note: See TracChangeset for help on using the changeset viewer.