summaryrefslogtreecommitdiff
path: root/meme/gui.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2014-09-13 01:00:05 (GMT)
committerWerner Almesberger <werner@almesberger.net>2014-09-13 01:00:05 (GMT)
commit3bba45ef5ecdc435b46b0ab99aeab728c36b8b9e (patch)
treeada01c4033e067ce89109a199dd1b135d9d7248b /meme/gui.c
parent72fba9389e57930a7c14e13d38a6623d3d68a339 (diff)
downloadmisc-3bba45ef5ecdc435b46b0ab99aeab728c36b8b9e.zip
misc-3bba45ef5ecdc435b46b0ab99aeab728c36b8b9e.tar.gz
misc-3bba45ef5ecdc435b46b0ab99aeab728c36b8b9e.tar.bz2
meme/gui.c (button_event): button 2 (middle) centers the current mouse position
Diffstat (limited to 'meme/gui.c')
-rw-r--r--meme/gui.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/meme/gui.c b/meme/gui.c
index 73dbe88..711e5eb 100644
--- a/meme/gui.c
+++ b/meme/gui.c
@@ -421,6 +421,10 @@ static void button_event(SDL_MouseButtonEvent *button)
int y = y_screen2model(button->y);
switch (button->button) {
+ case 2:
+ x_orig = x;
+ y_orig = y;
+ break;
case 4:
if (zoom == 1)
break;