Changeset db9ef0c in mainline
- Timestamp:
- 2011-12-31T12:16:21Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c637571
- Parents:
- 3fac882d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/char/ps2mouse/ps2mouse.c
r3fac882d rdb9ef0c 176 176 continue; 177 177 } 178 178 179 /* Buttons */ 179 180 for (unsigned i = 0; i < BUTTON_COUNT; ++i) { … … 184 185 } 185 186 } 187 186 188 /* Movement */ 187 const int move_x = ((packet[0] & X_SIGN) 188 ? (int)(int8_t)packet[1] : (int)packet[1]); 189 const int move_y = -((packet[0] & Y_SIGN) 190 ? (int)(int8_t)packet[2] : (int)packet[2]); 189 const int16_t move_x = 190 ((packet[0] & X_SIGN) ? 0xff00 : 0) | packet[1]; 191 const int16_t move_y = 192 (((packet[0] & Y_SIGN) ? 0xff00 : 0) | packet[2]); 193 //TODO: Consider overflow bit 191 194 if (move_x != 0 || move_y != 0) { 192 async_msg_2(exch, MOUSEEV_MOVE_EVENT, move_x, move_y);195 async_msg_2(exch, MOUSEEV_MOVE_EVENT, move_x, -move_y); 193 196 } 194 197 async_exchange_end(exch);
Note:
See TracChangeset
for help on using the changeset viewer.