summaryrefslogtreecommitdiff
path: root/meme/gui.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-05-12 16:41:09 (GMT)
committerWerner Almesberger <werner@almesberger.net>2016-05-12 16:41:09 (GMT)
commit0512a7015608cb0fe384bf46174a643b4b3e520c (patch)
treeefd460ad988cb30b35fa505ec26d9474e98b827e /meme/gui.c
parent4e43c0684d713d4269fc7ed6c89286b3c2381986 (diff)
downloadmisc-0512a7015608cb0fe384bf46174a643b4b3e520c.zip
misc-0512a7015608cb0fe384bf46174a643b4b3e520c.tar.gz
misc-0512a7015608cb0fe384bf46174a643b4b3e520c.tar.bz2
meme/gui.c, README: add "sticky" contrast enhancement mode
Diffstat (limited to 'meme/gui.c')
-rw-r--r--meme/gui.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/meme/gui.c b/meme/gui.c
index 03660d3..d148e39 100644
--- a/meme/gui.c
+++ b/meme/gui.c
@@ -249,10 +249,11 @@ static void begin_contrast(void)
}
-static void end_contrast(void)
+static void end_contrast(bool modifier)
{
contrast_mode = 0;
- reset_z_grad();
+ if (!modifier)
+ reset_z_grad();
}
@@ -1425,7 +1426,7 @@ static bool event_loop(SDL_Surface **surf, const char *logfile,
case SDL_KEYUP:
switch (event.key.keysym.sym) {
case SDLK_c:
- end_contrast();
+ end_contrast(event.key.keysym.mod & KMOD_SHIFT);
return 0;
case SDLK_e:
end_equal();