From 0df5fe8705fe1270616ca4dfd1456e1e45f3ed61 Mon Sep 17 00:00:00 2001 From: Alexander van Gessel Date: Sun, 5 Nov 2017 15:17:07 +0100 Subject: [PATCH] Properly size circular buffer In most cases, it should now use less memory and be faster to construct. In the other cases, blurring used to be incorrect because the buffer was too small. --- src/sdl/utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sdl/utils.cpp b/src/sdl/utils.cpp index 46103a1dfadc..b5d19cd445b0 100644 --- a/src/sdl/utils.cpp +++ b/src/sdl/utils.cpp @@ -1603,7 +1603,7 @@ surface blur_alpha_surface(const surface &surf, int depth) depth = max_blur; } - boost::circular_buffer queue(max_blur); + boost::circular_buffer queue(depth*2+1); const Uint32 ff = 0xff;