diff options
author | Harry Jeffery <harry@exec64.co.uk> | 2015-11-06 16:13:20 +0000 |
---|---|---|
committer | Harry Jeffery <harry@exec64.co.uk> | 2015-11-06 16:13:20 +0000 |
commit | 7ebfb17b8503f8913166568b487513c42806b1a2 (patch) | |
tree | 2337311357740d776123fc4aac24badf429c603e | |
parent | c8baf09498bb47c3762ac0dbaa32f6774fbfb1af (diff) | |
download | imv-7ebfb17b8503f8913166568b487513c42806b1a2.tar.gz |
Compress keyboard switch statement
-rw-r--r-- | main.c | 40 |
1 files changed, 10 insertions, 30 deletions
@@ -140,38 +140,18 @@ int main(int argc, char** argv) break; case SDL_KEYDOWN: switch (e.key.keysym.sym) { - case SDLK_q: - quit = 1; - break; - case SDLK_RIGHT: - prev_path(); - break; - case SDLK_LEFT: - next_path(); - break; + case SDLK_q: quit = 1; break; + case SDLK_RIGHT: prev_path(); break; + case SDLK_LEFT: next_path(); break; case SDLK_i: - case SDLK_UP: - zoom_view(1); - break; + case SDLK_UP: zoom_view(1); break; case SDLK_o: - case SDLK_DOWN: - zoom_view(-1); - break; - case SDLK_r: - reset_view(); - break; - case SDLK_j: - move_view(0, -50); - break; - case SDLK_k: - move_view(0, 50); - break; - case SDLK_h: - move_view(50, 0); - break; - case SDLK_l: - move_view(-50, 0); - break; + case SDLK_DOWN: zoom_view(-1); break; + case SDLK_r: reset_view(); break; + case SDLK_j: move_view(0, -50); break; + case SDLK_k: move_view(0, 50); break; + case SDLK_h: move_view(50, 0); break; + case SDLK_l: move_view(-50, 0); break; } break; case SDL_MOUSEWHEEL: |