summaryrefslogtreecommitdiffstats
path: root/commands.c
diff options
context:
space:
mode:
authorBert Münnich <be.muennich@googlemail.com>2012-05-06 13:02:34 +0200
committerBert Münnich <be.muennich@googlemail.com>2012-05-06 13:02:34 +0200
commit4c40cc24bc6b3e11fc9e6cf337ddb035fa750eb3 (patch)
treead2a11316cb2328e28a5bb223f87f1bd96b54fe3 /commands.c
parentba0a5b89fa1e9147c60ddb8bbc2b1bcbe2995cd8 (diff)
downloadnsxiv-4c40cc24bc6b3e11fc9e6cf337ddb035fa750eb3.tar.zst
Slightly refactored flipping
Diffstat (limited to 'commands.c')
-rw-r--r--commands.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/commands.c b/commands.c
index 92d5ca7..d07e950 100644
--- a/commands.c
+++ b/commands.c
@@ -343,18 +343,14 @@ bool i_rotate(arg_t a) {
}
bool i_flip(arg_t a) {
- flip_t flp = (flip_t) a;
+ flipdir_t dir = (flipdir_t) a;
if (mode == MODE_IMAGE) {
- if (flp == FLIP_HORIZONTAL) {
- img_flip_horizontal(&img);
- return true;
- } else if (flp == FLIP_VERTICAL) {
- img_flip_vertical(&img);
- return true;
- }
+ img_flip(&img, dir);
+ return true;
+ } else {
+ return false;
}
- return false;
}
bool i_toggle_antialias(arg_t a) {