summaryrefslogtreecommitdiff
path: root/meme
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2015-03-16 16:06:19 (GMT)
committerWerner Almesberger <werner@almesberger.net>2015-03-16 16:06:19 (GMT)
commitc8c50dc710229113e9302e45b1fead950af7dff0 (patch)
tree086b99a7e72476e17f0352d4237a6b10a1f3cc01 /meme
parente1876aff7344703bfd0853697277abeabe3a1011 (diff)
downloadmisc-c8c50dc710229113e9302e45b1fead950af7dff0.zip
misc-c8c50dc710229113e9302e45b1fead950af7dff0.tar.gz
misc-c8c50dc710229113e9302e45b1fead950af7dff0.tar.bz2
meme/: R reloads all overlays
Diffstat (limited to 'meme')
-rw-r--r--meme/README1
-rw-r--r--meme/gui.c10
-rw-r--r--meme/gui.h3
3 files changed, 9 insertions, 5 deletions
diff --git a/meme/README b/meme/README
index cafc505..6874ce6 100644
--- a/meme/README
+++ b/meme/README
@@ -32,6 +32,7 @@ Keyboard
- O: toggle overlay; see below
- P: toggle profiles display, see below
- Q: quit
+- R: reload all overlays
- 1, 2, 3: select the respective overlay (if present)
- *: center and zoom to extents
- +: zooom in
diff --git a/meme/gui.c b/meme/gui.c
index 056912b..e00f474 100644
--- a/meme/gui.c
+++ b/meme/gui.c
@@ -1198,10 +1198,11 @@ static void delayed_motion(void *user)
static bool event_loop(SDL_Surface **surf, const char *logfile,
- const struct overlay overlays[], unsigned n_overlays)
+ struct overlay overlays[], unsigned n_overlays)
{
SDL_Surface *s = *surf;
SDL_Event event;
+ unsigned i;
cancel_timer(&motion_timer);
while (1) {
@@ -1251,6 +1252,10 @@ static bool event_loop(SDL_Surface **surf, const char *logfile,
return 0;
case SDLK_q:
return 1;
+ case SDLK_r:
+ for (i = 0; i != n_overlays; i++)
+ overlay_reload(overlays + i);
+ return 0;
case SDLK_1:
if (n_overlays)
overlay = overlays + 0;
@@ -1300,8 +1305,7 @@ static bool event_loop(SDL_Surface **surf, const char *logfile,
}
-void gui(const char *logfile,
- const struct overlay overlays[], unsigned n_overlays)
+void gui(const char *logfile, struct overlay overlays[], unsigned n_overlays)
{
SDL_Surface *surf;
diff --git a/meme/gui.h b/meme/gui.h
index cc99a05..05f1226 100644
--- a/meme/gui.h
+++ b/meme/gui.h
@@ -16,7 +16,6 @@
#include "overlay.h"
-void gui(const char *logfile,
- const struct overlay overlays[], unsigned n_overlays);
+void gui(const char *logfile, struct overlay overlays[], unsigned n_overlays);
#endif /* !GUI_H */