Changes in uspace/srv/hid/input/generic/input.c [f302586:5da7199] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/input/generic/input.c
rf302586 r5da7199 172 172 173 173 /** Mouse pointer has moved. */ 174 void mouse_push_event_move(mouse_dev_t *mdev, int dx, int dy , int dz)174 void mouse_push_event_move(mouse_dev_t *mdev, int dx, int dy) 175 175 { 176 176 async_exch_t *exch = async_exchange_begin(client_sess); 177 if (dx || dy) 178 async_msg_2(exch, INPUT_EVENT_MOVE, dx, dy); 179 if (dz) { 180 // TODO: Implement proper wheel support 181 keycode_t code = dz > 0 ? KC_UP : KC_DOWN; 182 for (int i = 0; i < 3; ++i) { 183 async_msg_4(exch, INPUT_EVENT_KEY, KEY_PRESS, code, 0, 0); 184 } 185 async_msg_4(exch, INPUT_EVENT_KEY, KEY_RELEASE, code, 0, 0); 186 } 177 async_msg_2(exch, INPUT_EVENT_MOVE, dx, dy); 187 178 async_exchange_end(exch); 188 179 } … … 406 397 * them automatically. 407 398 */ 399 #if defined(UARCH_amd64) 400 kbd_add_dev(&chardev_port, &pc_ctl); 401 #endif 408 402 #if defined(UARCH_arm32) && defined(MACHINE_gta02) 409 403 kbd_add_dev(&chardev_port, &stty_ctl); … … 417 411 #if defined(UARCH_arm32) && defined(MACHINE_integratorcp) 418 412 kbd_add_dev(&pl050_port, &pc_ctl); 413 #endif 414 #if defined(UARCH_ia32) 415 kbd_add_dev(&chardev_port, &pc_ctl); 416 #endif 417 #if defined(MACHINE_i460GX) 418 kbd_add_dev(&chardev_port, &pc_ctl); 419 419 #endif 420 420 #if defined(MACHINE_ski) … … 450 450 * them automatically. 451 451 */ 452 #if defined(UARCH_amd64) 453 mouse_add_dev(&chardev_mouse_port, &ps2_proto); 454 #endif 455 #if defined(UARCH_ia32) 456 mouse_add_dev(&chardev_mouse_port, &ps2_proto); 457 #endif 458 #if defined(MACHINE_i460GX) 459 mouse_add_dev(&chardev_mouse_port, &ps2_proto); 460 #endif 452 461 #if defined(UARCH_ppc32) 453 462 mouse_add_dev(&adb_mouse_port, &adb_proto); … … 649 658 650 659 /* Register driver */ 651 async_set_client_connection(client_connection); 652 int rc = loc_server_register(NAME); 660 int rc = loc_server_register(NAME, client_connection); 653 661 if (rc < 0) { 654 662 printf("%s: Unable to register server (%d)\n", NAME, rc);
Note:
See TracChangeset
for help on using the changeset viewer.