summaryrefslogtreecommitdiff
path: root/meme/gui.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2014-09-13 17:17:14 (GMT)
committerWerner Almesberger <werner@almesberger.net>2014-09-13 17:17:14 (GMT)
commitd29d97b74306e97353414023d768775c9593de81 (patch)
tree916e6f71fb92ead6881ce9f1d403fd30d8b38463 /meme/gui.c
parent492744de8451ba08aab4da19b1bb1fd2d040afa2 (diff)
downloadmisc-d29d97b74306e97353414023d768775c9593de81.zip
misc-d29d97b74306e97353414023d768775c9593de81.tar.gz
misc-d29d97b74306e97353414023d768775c9593de81.tar.bz2
meme/gui.c; autoscale on "*" (and enable Unicode translation)
Diffstat (limited to 'meme/gui.c')
-rw-r--r--meme/gui.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/meme/gui.c b/meme/gui.c
index 63fdefd..7c9ddf1 100644
--- a/meme/gui.c
+++ b/meme/gui.c
@@ -815,6 +815,13 @@ static bool event_loop(SDL_Surface **surf)
default:
break;
}
+ if (event.key.keysym.unicode & 0xFF80)
+ break;
+ switch (event.key.keysym.unicode) {
+ case '*':
+ auto_scale();
+ return 0;
+ }
break;
case SDL_QUIT:
return 1;
@@ -843,6 +850,8 @@ void gui(void)
xres = surf->w;
yres = surf->h;
+ SDL_EnableUNICODE(1);
+
extrema();
auto_scale();