fixed last commit

This commit is contained in:
oy 2015-12-21 11:05:23 +01:00
parent afa8e57ef2
commit bd14ce2a1b

View file

@ -456,7 +456,7 @@ void CCommandProcessorFragment_OpenGL::Cmd_Screenshot(const CCommandBuffer::SCom
int w = pCommand->m_W == -1 ? aViewport[2] : pCommand->m_W; int w = pCommand->m_W == -1 ? aViewport[2] : pCommand->m_W;
int h = pCommand->m_H == -1 ? aViewport[3] : pCommand->m_H; int h = pCommand->m_H == -1 ? aViewport[3] : pCommand->m_H;
int x = pCommand->m_X; 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 // 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); unsigned char *pPixelData = (unsigned char *)mem_alloc(w*(h+1)*3, 1);