Advertisement
Guest User

Untitled

a guest
May 7th, 2013
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.70 KB | None | 0 0
  1. Index: trunk/dev/MSDK/MGui/Sources/X11/MJoystickLinux.cpp
  2. ===================================================================
  3. --- trunk/dev/MSDK/MGui/Sources/X11/MJoystickLinux.cpp (Revision 200)
  4. +++ trunk/dev/MSDK/MGui/Sources/X11/MJoystickLinux.cpp (Arbeitskopie)
  5. @@ -120,17 +120,4 @@
  6. }
  7.  
  8.  
  9. -}
  10. -
  11. -int main(int argc, char* argv[])
  12. -{
  13. - MJoystickLinux joystick(JOY1_DEV);
  14. -
  15. - while(1)
  16. - {
  17. - joystick.updateData();
  18. -
  19. - printf("Axis x = %f\n", joystick.getDeltaAxis(0));
  20. - fflush(stdout);
  21. - }
  22. }
  23. \ Kein Zeilenumbruch am Ende der Datei
  24. Index: trunk/dev/MSDK/MGui/Sources/X11/MX11Window.cpp
  25. ===================================================================
  26. --- trunk/dev/MSDK/MGui/Sources/X11/MX11Window.cpp (Revision 200)
  27. +++ trunk/dev/MSDK/MGui/Sources/X11/MX11Window.cpp (Arbeitskopie)
  28. @@ -213,7 +213,7 @@
  29.  
  30. #ifdef linux
  31. static void updateJoystick(MJoystick* joystick, MJoystickLinux* joystickLinux,
  32. - MWindow* window)
  33. + MWindow* window, MWIN_EVENT_TYPE eventType)
  34. {
  35. joystickLinux->updateData();
  36.  
  37. @@ -239,7 +239,7 @@
  38. joystick->setV(joystickLinux->getDeltaAxis(5));
  39.  
  40. MWinEvent events;
  41. - events.type = MWIN_EVENT_JOYSTICK1_UPDATE;
  42. + events.type = eventType;
  43. window->sendEvents(&events);
  44.  
  45. joystick->flush();
  46. @@ -575,10 +575,10 @@
  47. MWindow* window = MWindow::getInstance();
  48.  
  49. MJoystick* joystick = window->getJoystick1();
  50. - updateJoystick(joystick, &joystick1, window);
  51. + updateJoystick(joystick, &joystick1, window, MWIN_EVENT_JOYSTICK1_UPDATE);
  52.  
  53. joystick = window->getJoystick2();
  54. - updateJoystick(joystick, &joystick2, window);
  55. + updateJoystick(joystick, &joystick2, window, MWIN_EVENT_JOYSTICK2_UPDATE);
  56. #endif
  57.  
  58. return true;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement