diff options
author | Aleksandra Kosiacka <kosiacka@uni.coventry.ac.uk> | 2015-12-10 19:10:07 +0000 |
---|---|---|
committer | Aleksandra Kosiacka <kosiacka@uni.coventry.ac.uk> | 2015-12-10 19:10:07 +0000 |
commit | 9b73560f7fb2f8ddbfbf2a74e58b44f471d46289 (patch) | |
tree | ade46bb4ad3ed92550aa52a45d7b84770e6b99f3 /src | |
parent | edad12139bd984eb856bb7248b09b2c2f363cecd (diff) | |
download | imv-9b73560f7fb2f8ddbfbf2a74e58b44f471d46289.tar.gz |
hide mouse on key press
fixes #37
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -295,6 +295,7 @@ int main(int argc, char** argv) quit = 1; break; case SDL_KEYDOWN: + SDL_ShowCursor(SDL_DISABLE); switch (e.key.keysym.sym) { case SDLK_q: quit = 1; @@ -375,11 +376,13 @@ int main(int argc, char** argv) break; case SDL_MOUSEWHEEL: imv_viewport_zoom(&view, &tex, IMV_ZOOM_MOUSE, e.wheel.y); + SDL_ShowCursor(SDL_ENABLE); break; case SDL_MOUSEMOTION: if(e.motion.state & SDL_BUTTON_LMASK) { imv_viewport_move(&view, e.motion.xrel, e.motion.yrel); } + SDL_ShowCursor(SDL_ENABLE); break; case SDL_WINDOWEVENT: imv_viewport_update(&view, &tex); |