Wrecked Games

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're just that awesome.

Author Topic: [PATCH] jumps in the mouse  (Read 471 times)

makiolo

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 1
    • View Profile
[PATCH] jumps in the mouse
« on: September 05, 2010, 05:43:07 PM »

This patch has solved my problem in Linux (with last revision 17).
Now the movement is smooth.
The patch is temporary, that is not true for high-speed movements.
The problem is that the Wrap generates events.

Code: [Select]
Index: src/linux/LinuxMouse.cpp
===================================================================
--- src/linux/LinuxMouse.cpp (revisión: 17)
+++ src/linux/LinuxMouse.cpp (copia de trabajo)
@@ -174,6 +174,10 @@
  //Compute this frames Relative X & Y motion

  int dx = event.xmotion.x - oldXMouseX;

  int dy = event.xmotion.y - oldXMouseY;

+            

+ if( dx > +(mState.width/2 - 5) || dx < -(mState.width/2 - 5) ||

+ dy > +(mState.height/2 - 5) || dy < -(mState.height/2 - 5))

+ continue;

 

  //Store old values for next time to compute relative motion

  oldXMouseX = event.xmotion.x;

« Last Edit: September 06, 2010, 03:59:03 AM by makiolo »
Logged