aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorHarry Jeffery <harry@exec64.co.uk>2015-11-11 10:10:41 +0000
committerHarry Jeffery <harry@exec64.co.uk>2015-11-11 10:10:41 +0000
commit87670b6a6de9afff403e5d71f0b703505b6cfab0 (patch)
tree72c7a809d6288a272cfe9493b04786ea8af06516 /main.c
parentc6fe57dc3d78a78830bdebda9fe94eac04e2f1f2 (diff)
downloadimv-87670b6a6de9afff403e5d71f0b703505b6cfab0.tar.gz
Add c = center hotkey
Diffstat (limited to 'main.c')
-rw-r--r--main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/main.c b/main.c
index dbf0649..22113f3 100644
--- a/main.c
+++ b/main.c
@@ -63,6 +63,7 @@ void print_usage(const char* name)
" 'k': Pan up\n"
" 'l': Pan right\n"
" 'r': Reset view\n"
+ " 'c': Center view\n"
" 's': Scale image to fit window\n"
" 'x': Close current image\n"
" 'f': Toggle fullscreen\n"
@@ -191,6 +192,7 @@ int main(int argc, char** argv)
case SDLK_o:
case SDLK_DOWN: imv_viewport_zoom(&view, -1); break;
case SDLK_r: imv_viewport_reset(&view); break;
+ case SDLK_c: imv_viewport_center(&view, &img); break;
case SDLK_j: imv_viewport_move(&view, 0, -50); break;
case SDLK_k: imv_viewport_move(&view, 0, 50); break;
case SDLK_h: imv_viewport_move(&view, 50, 0); break;