Changeset f1d6866 in mainline for uspace/srv/hid/fb/port/kfb.c


Ignore:
Timestamp:
2011-09-18T21:22:59Z (13 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
dcc44ca1
Parents:
85ff862 (diff), 45a9cf4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/fb/port/kfb.c

    r85ff862 rf1d6866  
    422422{
    423423        if (kfb.backbuf == NULL) {
    424                 kfb.backbuf = malloc(kfb.size);
     424                kfb.backbuf =
     425                    malloc(kfb.width * kfb.height * kfb.pixel_bytes);
    425426                if (kfb.backbuf == NULL)
    426427                        return ENOMEM;
    427428        }
    428429       
    429         memcpy(kfb.backbuf, kfb.addr, kfb.size);
     430        for (sysarg_t y = 0; y < kfb.height; y++)
     431                memcpy(kfb.backbuf + y * kfb.width * kfb.pixel_bytes,
     432                    kfb.addr + FB_POS(0, y), kfb.width * kfb.pixel_bytes);
     433       
    430434        return EOK;
    431435}
     
    436440                return ENOENT;
    437441       
    438         memcpy(kfb.addr, kfb.backbuf, kfb.size);
     442        for (sysarg_t y = 0; y < kfb.height; y++)
     443                memcpy(kfb.addr + FB_POS(0, y),
     444                    kfb.backbuf + y * kfb.width * kfb.pixel_bytes,
     445                    kfb.width * kfb.pixel_bytes);
     446       
    439447        return EOK;
    440448}
Note: See TracChangeset for help on using the changeset viewer.