diff options
| author | jacksonmj <mj-pt@jacksonmj.co.uk> | 2011-02-20 22:38:19 (GMT) |
|---|---|---|
| committer | FacialTurd <simon@hardwired.org.uk> | 2011-02-21 16:08:20 (GMT) |
| commit | 6f2965d0d069e8586d9ca32d042ee6dd094cb0f0 (patch) | |
| tree | 99318f838f004de815e151ea7cce6ff6ce5a33b5 /src/interface.c | |
| parent | 1419337374ad254eddab69fa1bff11204abca69d (diff) | |
| download | powder-6f2965d0d069e8586d9ca32d042ee6dd094cb0f0.zip powder-6f2965d0d069e8586d9ca32d042ee6dd094cb0f0.tar.gz | |
Zoom key conflict with international keyboards
Change zoom key to only use keysym.sym, like all the other keyboard
controls. This may mean it is no longer the 'z' key on all
systems, but will prevent it conflicting with the
other keyboard controls.
Diffstat (limited to 'src/interface.c')
| -rw-r--r-- | src/interface.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/interface.c b/src/interface.c index 0efc780..2aef363 100644 --- a/src/interface.c +++ b/src/interface.c @@ -60,8 +60,6 @@ char search_expr[256] = ""; char *tag_names[TAG_MAX]; int tag_votes[TAG_MAX]; -int Z_keysym = 'z'; - int zoom_en = 0; int zoom_x=(XRES-ZSIZE_D)/2, zoom_y=(YRES-ZSIZE_D)/2; int zoom_wx=0, zoom_wy=0; @@ -1763,10 +1761,9 @@ int sdl_poll(void) sdl_ascii=event.key.keysym.unicode; if (event.key.keysym.sym == SDLK_CAPSLOCK) sdl_caps = 1; - if (event.key.keysym.unicode=='z' || event.key.keysym.unicode=='Z') + if (event.key.keysym.sym=='z') { sdl_zoom_trig = 1; - Z_keysym = event.key.keysym.sym; } if ( event.key.keysym.sym == SDLK_PLUS) { @@ -1816,7 +1813,7 @@ int sdl_poll(void) case SDL_KEYUP: if (event.key.keysym.sym == SDLK_CAPSLOCK) sdl_caps = 0; - if (event.key.keysym.sym == Z_keysym) + if (event.key.keysym.sym == 'z') sdl_zoom_trig = 0; if (event.key.keysym.sym == SDLK_RIGHT || event.key.keysym.sym == SDLK_LEFT) { |
