Advertisement
dominus

Untitled

Jun 26th, 2021
1,648
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.11 KB | None | 0 0
  1. diff --git a/exult.cc b/exult.cc
  2. index 104411b5..629747f1 100644
  3. --- a/exult.cc
  4. +++ b/exult.cc
  5. @@ -1585,6 +1585,9 @@ static void Handle_event(
  6.     case SDL_MOUSEMOTION: {
  7.         int mx ;
  8.         int my;
  9. +       if (event.motion.which == SDL_TOUCH_MOUSEID){
  10. +           cout << "FINGER MOTION" << endl;
  11. +           Mouse::is_finger = true;}
  12.         gwin->get_win()->screen_to_game(event.motion.x, event.motion.y, gwin->get_fastmouse(), mx, my);
  13.  
  14.         Mouse::mouse->move(mx, my);
  15. diff --git a/mouse.cc b/mouse.cc
  16. index ad8d848c..55b2a5bd 100644
  17. --- a/mouse.cc
  18. +++ b/mouse.cc
  19. @@ -43,7 +43,8 @@ using std::max;
  20.  
  21.  static inline bool should_hide_frame(int frame) {
  22.  #ifdef __IPHONEOS__
  23. -   return frame == 0 || (frame >=8 && frame <= 47);
  24. +   if (is_finger)
  25. +       return frame == 0 || (frame >=8 && frame <= 47);
  26.  #else
  27.     ignore_unused_variable_warning(frame);
  28.     return false;
  29. diff --git a/mouse.h b/mouse.h
  30. index 0eaf7a38..88617cfc 100644
  31. --- a/mouse.h
  32. +++ b/mouse.h
  33. @@ -91,7 +91,8 @@ class Mouse {
  34.         fast_speed_factor          = 400
  35.     };
  36.     int avatar_speed;
  37. -
  38. +  
  39. +   static bool is_finger;
  40.     static bool mouse_update;
  41.     static Mouse *mouse;
  42.  
  43.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement