aboutsummaryrefslogtreecommitdiff
path: root/src/imv.c
diff options
context:
space:
mode:
authornycex <nycex@cccp.org>2020-03-27 01:52:56 +0100
committerHarry Jeffery <harry@exec64.co.uk>2020-05-21 11:22:47 +0100
commitbdfa1fcbae4ce41ecfc92ab0a04a0262875b1730 (patch)
tree8e69ad483439f4545ac2c9654453351ed7c177fa /src/imv.c
parenta8c1ffa3cf5e138c56a09f71f636d3dc5d49101f (diff)
downloadimv-bdfa1fcbae4ce41ecfc92ab0a04a0262875b1730.tar.gz
fix nearest_neighbour upscaling method
Diffstat (limited to 'src/imv.c')
-rw-r--r--src/imv.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/imv.c b/src/imv.c
index 4231fd4..5522223 100644
--- a/src/imv.c
+++ b/src/imv.c
@@ -92,6 +92,7 @@ struct imv {
/* dirty state flags */
bool need_redraw;
bool need_rescale;
+ bool cache_invalidated;
/* traverse sub-directories for more images */
bool recursive_load;
@@ -1185,7 +1186,7 @@ static void render_window(struct imv *imv)
double scale;
imv_viewport_get_offset(imv->view, &x, &y);
imv_viewport_get_scale(imv->view, &scale);
- imv_canvas_draw_image(imv->canvas, imv->current_image, x, y, scale, imv->upscaling_method);
+ imv_canvas_draw_image(imv->canvas, imv->current_image, x, y, scale, imv->upscaling_method, imv->cache_invalidated);
}
imv_canvas_clear(imv->canvas);
@@ -1229,6 +1230,7 @@ static void render_window(struct imv *imv)
/* redraw complete, unset the flag */
imv->need_redraw = false;
+ imv->cache_invalidated = false;
}
static char *get_config_path(void)
@@ -1650,6 +1652,7 @@ static void command_set_upscaling_method(struct list *args, const char *argstr,
}
imv->need_redraw = true;
+ imv->cache_invalidated = true;
}
static void command_set_slideshow_duration(struct list *args, const char *argstr, void *data)