Fixed two-finger scrolling

This commit is contained in:
Sergii Pylypenko
2019-08-31 19:55:02 +03:00
parent dd2c249473
commit 980a5b503f
2 changed files with 6 additions and 5 deletions

View File

@@ -2676,7 +2676,10 @@ static EventState HandleViewportScroll()
* outside of the window and should not left-mouse scroll anymore. */
if (_last_scroll_window == NULL) _last_scroll_window = FindWindowFromPt(_cursor.pos.x, _cursor.pos.y);
if (_last_scroll_window == NULL || !((_settings_client.gui.scroll_mode != VSM_MAP_LMB && _right_button_down) || scrollwheel_scrolling || ((_move_pressed || _settings_client.gui.scroll_mode == VSM_MAP_LMB) && _left_button_down))) {
if (_last_scroll_window == NULL || !(
(_settings_client.gui.scroll_mode != VSM_MAP_LMB && _right_button_down) ||
scrollwheel_scrolling ||
((_move_pressed || _settings_client.gui.scroll_mode == VSM_MAP_LMB) && (_left_button_down || _right_button_down)))) {
_cursor.fix_at = false;
_scrolling_viewport = false;
_last_scroll_window = NULL;
@@ -3166,8 +3169,8 @@ static void MouseLoop(MouseClick click, int mousewheel)
return;
case MC_RIGHT:
if (!(w->flags & WF_DISABLE_VP_SCROLL) &&
_settings_client.gui.scroll_mode != VSM_MAP_LMB) {
if (!(w->flags & WF_DISABLE_VP_SCROLL)) {
printf("RMB scroll start\n");
_scrolling_viewport = true;
_cursor.fix_at = (_settings_client.gui.scroll_mode == VSM_VIEWPORT_RMB_FIXED ||
_settings_client.gui.scroll_mode == VSM_MAP_RMB_FIXED);

View File

@@ -11,5 +11,3 @@
- Select native screen width x 480 resolution on first run.
- Two-finger scroll when building road is broken.