Skip to content

Commit 2dd0135

Browse files
committed
And minimap too
1 parent 0e6c74b commit 2dd0135

1 file changed

Lines changed: 7 additions & 13 deletions

File tree

‎src/Battlescape/MiniMapView.cpp‎

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -279,13 +279,10 @@ void MiniMapView::mouseOver(Action *action, State *state)
279279

280280
_isMouseScrolled = true;
281281

282-
if (Options::dragScrollInvert)
283-
{
284-
// Set the mouse cursor back
285-
SDL_EventState(SDL_MOUSEMOTION, SDL_IGNORE);
286-
SDL_WarpMouse(_xBeforeMouseScrolling, _yBeforeMouseScrolling);
287-
SDL_EventState(SDL_MOUSEMOTION, SDL_ENABLE);
288-
}
282+
// Set the mouse cursor back
283+
SDL_EventState(SDL_MOUSEMOTION, SDL_IGNORE);
284+
SDL_WarpMouse(_xBeforeMouseScrolling, _yBeforeMouseScrolling);
285+
SDL_EventState(SDL_MOUSEMOTION, SDL_ENABLE);
289286

290287
// Check the threshold
291288
_totalMouseMoveX += action->getDetails()->motion.xrel;
@@ -331,12 +328,9 @@ void MiniMapView::mouseOver(Action *action, State *state)
331328
_camera->centerOnPosition(Position(newX,newY,_camera->getViewLevel()));
332329
_redraw = true;
333330

334-
if (Options::dragScrollInvert)
335-
{
336-
// We don't want to look the mouse-cursor jumping :)
337-
action->getDetails()->motion.x=_xBeforeMouseScrolling; action->getDetails()->motion.y=_yBeforeMouseScrolling;
338-
_game->getCursor()->handle(action);
339-
}
331+
// We don't want to look the mouse-cursor jumping :)
332+
action->getDetails()->motion.x=_xBeforeMouseScrolling; action->getDetails()->motion.y=_yBeforeMouseScrolling;
333+
_game->getCursor()->handle(action);
340334
}
341335
}
342336

0 commit comments

Comments
 (0)