(svn r27167) -Fix: [SDL, Windows] Right-mouse-button scrolling scrolled/jumped way to far, when OpenTTD lagged during mouse event processing.

This commit is contained in:
frosch
2015-02-22 23:06:45 +00:00
parent fece468d96
commit 352e528cda
6 changed files with 65 additions and 64 deletions

View File

@@ -362,22 +362,8 @@ static void QZ_DoUnsidedModifiers(unsigned int newMods)
static void QZ_MouseMovedEvent(int x, int y)
{
if (_cursor.fix_at) {
int dx = x - _cursor.pos.x;
int dy = y - _cursor.pos.y;
if (dx != 0 || dy != 0) {
_cursor.delta.x += dx;
_cursor.delta.y += dy;
QZ_WarpCursor(_cursor.pos.x, _cursor.pos.y);
}
} else {
_cursor.delta.x = x - _cursor.pos.x;
_cursor.delta.y = y - _cursor.pos.y;
_cursor.pos.x = x;
_cursor.pos.y = y;
_cursor.dirty = true;
if (_cursor.UpdateCursorPosition(x, y, false)) {
QZ_WarpCursor(_cursor.pos.x, _cursor.pos.y);
}
HandleMouseEvents();
}