summaryrefslogtreecommitdiff
path: root/src/video
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2014-01-02 23:12:32 +0000
committerrubidium <rubidium@openttd.org>2014-01-02 23:12:32 +0000
commitfb05674cb76e05d12763539ae3f8fd18414a6660 (patch)
tree952796fb20c183992a4072913815d00aea06628e /src/video
parent899c0f9cd230bc36fc006e54bf88f598ab725257 (diff)
downloadopenttd-fb05674cb76e05d12763539ae3f8fd18414a6660.tar.xz
(svn r26211) -Add: specialised non-animated SS2 blitter (MJP)
With 32bpp base set about 30% faster than 32bpp-optimized, or about 10% for 8bpp base sets in the Draw function. Respectively about 5 and 1% of total run time
Diffstat (limited to 'src/video')
-rw-r--r--src/video/win32_v.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp
index 186ac1025..02cae68e2 100644
--- a/src/video/win32_v.cpp
+++ b/src/video/win32_v.cpp
@@ -1077,7 +1077,7 @@ static bool AllocateDibSection(int w, int h, bool force)
bi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
bi->bmiHeader.biWidth = _wnd.width = w;
- bi->bmiHeader.biHeight = -(_wnd.height = h);
+ bi->bmiHeader.biHeight = -(_wnd.height = h+1); // Allocate extra room to prevent out-of-bounds when SSE reads a 16B block at the end of the buffer.
bi->bmiHeader.biPlanes = 1;
bi->bmiHeader.biBitCount = BlitterFactory::GetCurrentBlitter()->GetScreenDepth();