aboutsummaryrefslogtreecommitdiff
path: root/src/imv.c
diff options
context:
space:
mode:
authorHarry Jeffery <harry@exec64.co.uk>2017-08-06 20:15:05 +0100
committerGitHub <noreply@github.com>2017-08-06 20:15:05 +0100
commit167f1280ce974247dfce30dac840f4b3130bd12d (patch)
tree7a9dcc420a109d01166b5857dc75148a539dae31 /src/imv.c
parentcf0baaa9778b842c4d2ed3c2f560906bce800eb9 (diff)
parent69cc94ef23ea2b11c65a4c06e5e17aaea95a973e (diff)
downloadimv-167f1280ce974247dfce30dac840f4b3130bd12d.tar.gz
Merge pull request #112 from SirCmpwn/limit_scrolling
Prevent scrolling images indefinitely off-screen
Diffstat (limited to 'src/imv.c')
-rw-r--r--src/imv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/imv.c b/src/imv.c
index 368973b..34066cf 100644
--- a/src/imv.c
+++ b/src/imv.c
@@ -722,7 +722,7 @@ static void handle_event(struct imv *imv, SDL_Event *event)
break;
case SDL_MOUSEMOTION:
if(event->motion.state & SDL_BUTTON_LMASK) {
- imv_viewport_move(imv->view, event->motion.xrel, event->motion.yrel);
+ imv_viewport_move(imv->view, event->motion.xrel, event->motion.yrel, imv->texture);
}
SDL_ShowCursor(SDL_ENABLE);
break;
@@ -815,7 +815,7 @@ void command_pan(struct imv_list *args, void *data)
long int x = strtol(args->items[1], NULL, 10);
long int y = strtol(args->items[2], NULL, 10);
- imv_viewport_move(imv->view, x, y);
+ imv_viewport_move(imv->view, x, y, imv->texture);
}
void command_select_rel(struct imv_list *args, void *data)