From bd14ce2a1b947b372ce96ac96630c09648ed792c Mon Sep 17 00:00:00 2001 From: oy Date: Mon, 21 Dec 2015 11:05:23 +0100 Subject: [PATCH] fixed last commit --- src/engine/client/backend_sdl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/client/backend_sdl.cpp b/src/engine/client/backend_sdl.cpp index 70907d659..bad5927c8 100644 --- a/src/engine/client/backend_sdl.cpp +++ b/src/engine/client/backend_sdl.cpp @@ -456,7 +456,7 @@ void CCommandProcessorFragment_OpenGL::Cmd_Screenshot(const CCommandBuffer::SCom int w = pCommand->m_W == -1 ? aViewport[2] : pCommand->m_W; int h = pCommand->m_H == -1 ? aViewport[3] : pCommand->m_H; int x = pCommand->m_X; - int y = aViewport[3] - pCommand->m_Y - h; + int y = aViewport[3] - pCommand->m_Y - 1 - (h - 1); // we allocate one more row to use when we are flipping the texture unsigned char *pPixelData = (unsigned char *)mem_alloc(w*(h+1)*3, 1);