summaryrefslogtreecommitdiff
path: root/meme/gui.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2015-03-14 14:51:27 (GMT)
committerWerner Almesberger <werner@almesberger.net>2015-03-14 14:55:31 (GMT)
commit4405e30b6c126bd25c7a52f15919c5fe2e4ff7cf (patch)
tree35edbafc4de622640e08c5935892f9642af0cfc6 /meme/gui.c
parent06474f30bc0090c93a592a1cd35f5b1c4271d68e (diff)
downloadmisc-4405e30b6c126bd25c7a52f15919c5fe2e4ff7cf.zip
misc-4405e30b6c126bd25c7a52f15919c5fe2e4ff7cf.tar.gz
misc-4405e30b6c126bd25c7a52f15919c5fe2e4ff7cf.tar.bz2
meme/: generalize overlay handling (no globals, support multiple overlays)
Diffstat (limited to 'meme/gui.c')
-rw-r--r--meme/gui.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/meme/gui.c b/meme/gui.c
index c518755..80aedf4 100644
--- a/meme/gui.c
+++ b/meme/gui.c
@@ -921,9 +921,9 @@ static void lineto(void *user, int x, int y)
}
-static void draw_overlay(SDL_Surface *s)
+static void draw_overlay(SDL_Surface *s, const struct overlay *overlay)
{
- overlay_draw(moveto, lineto, s);
+ overlay_draw(overlay, moveto, lineto, s);
}
@@ -1284,7 +1284,7 @@ static bool event_loop(SDL_Surface **surf, const char *logfile)
}
-void gui(const char *logfile)
+void gui(const char *logfile, const struct overlay *overlay)
{
SDL_Surface *surf;
@@ -1319,7 +1319,7 @@ time_start(&t);
time_stop(&t);
fprintf(stderr, "%.3f s @ zoom %d\n", time_ms(&t)/1000.0, zoom);
if (show_overlay)
- draw_overlay(surf);
+ draw_overlay(surf, overlay);
SDL_UnlockSurface(surf);
SDL_UpdateRect(surf, 0, 0, 0, 0);