Advertisement
Guest User

Untitled

a guest
May 16th, 2014
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. diff -r 8af7a4af8fe0 src/video/mir/SDL_mirevents.c
  2. --- a/src/video/mir/SDL_mirevents.c Sun May 11 15:59:22 2014 +0200
  3. +++ b/src/video/mir/SDL_mirevents.c Fri May 16 11:21:39 2014 +0200
  4. @@ -164,7 +164,13 @@
  5.  
  6. AddTouchDevice(motion.device_id);
  7.  
  8. - switch (motion.action) {
  9. + int real_action = mir_motion_action_move;
  10. + if (motion.action >> 8 == cord_index)
  11. + {
  12. + real_action = motion.action & 0xff;
  13. + }
  14. +
  15. + switch (real_action) {
  16. case mir_motion_action_down:
  17. case mir_motion_action_pointer_down:
  18. HandleTouchPress(device_id, id, SDL_TRUE, n_x, n_y, pressure);
  19. @@ -187,7 +193,13 @@
  20. {
  21. SDL_SetMouseFocus(sdl_window);
  22.  
  23. - switch (motion.action) {
  24. + int real_action = mir_motion_action_move;
  25. + if (motion.action >> 8 == cord_index)
  26. + {
  27. + real_action = motion.action & 0xff;
  28. + }
  29. +
  30. + switch (real_action) {
  31. case mir_motion_action_down:
  32. case mir_motion_action_pointer_down:
  33. HandleMouseButton(sdl_window, SDL_PRESSED, motion.button_state);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement