Changeset 830ac99 in mainline for console/gcons.c


Ignore:
Timestamp:
2006-06-15T19:53:38Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
096ba7a
Parents:
7a0c530
Message:

Added mouse input. Still missing support in console and framebuffer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • console/gcons.c

    r7a0c530 r830ac99  
    231231}
    232232
     233
     234static inline int limit(int a,int left, int right)
     235{
     236        if (a < left)
     237                a = left;
     238        if (a >= right)
     239                a = right - 1;
     240        return a;
     241}
     242
     243void gcons_mouse_move(int dx, int dy)
     244{
     245        static int x = 0;
     246        static int y = 0;
     247
     248        x = limit(x+dx, 0, xres);
     249        y = limit(y+dy, 0, yres);
     250
     251        async_msg_2(fbphone, FB_POINTER_MOVE, x, y);
     252}
     253
     254
    233255/** Draw a PPM pixmap to framebuffer
    234256 *
Note: See TracChangeset for help on using the changeset viewer.