1
0
Fork 0

(svn r18030) -Fix: screen jumped a bit for at least SDL and Allegro when right-click-dragging

release/1.0
rubidium 2009-11-09 16:05:24 +00:00
parent 85a910f02e
commit cbf4b80b86
3 changed files with 6 additions and 4 deletions

View File

@ -1064,8 +1064,6 @@ public:
if (widget == SM_WIDGET_MAP) { if (widget == SM_WIDGET_MAP) {
if (_scrolling_viewport) return; if (_scrolling_viewport) return;
_scrolling_viewport = true; _scrolling_viewport = true;
_cursor.delta.x = 0;
_cursor.delta.y = 0;
} }
} }

View File

@ -879,7 +879,6 @@ void VideoDriver_Win32::MainLoop()
if (old_ctrl_pressed != _ctrl_pressed) HandleCtrlChanged(); if (old_ctrl_pressed != _ctrl_pressed) HandleCtrlChanged();
GameLoop(); GameLoop();
_cursor.delta.x = _cursor.delta.y = 0;
if (_force_full_redraw) MarkWholeScreenDirty(); if (_force_full_redraw) MarkWholeScreenDirty();

View File

@ -2197,7 +2197,7 @@ static void HandleKeyScrolling()
} }
} }
void MouseLoop(MouseClick click, int mousewheel) static void MouseLoop(MouseClick click, int mousewheel)
{ {
DecreaseWindowCounters(); DecreaseWindowCounters();
HandlePlacePresize(); HandlePlacePresize();
@ -2340,6 +2340,11 @@ void HandleMouseEvents()
} }
MouseLoop(click, mousewheel); MouseLoop(click, mousewheel);
/* We have moved the mouse the required distance,
* no need to move it at any later time. */
_cursor.delta.x = 0;
_cursor.delta.y = 0;
} }
/** /**