1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-26 12:42:41 +01:00

Minor fix

This commit is contained in:
raven02 2014-11-18 14:44:37 +08:00
parent 427fd58ef2
commit cd347fa110

View File

@ -2037,8 +2037,12 @@ void GLGSRender::Flip()
glReadPixels(0, 0, RSXThread::m_width, RSXThread::m_height, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, 0);
checkForGlError("Flip(): glReadPixels(GL_BGRA, GL_UNSIGNED_INT_8_8_8_8)");
GLubyte *packed = (GLubyte *)glMapBuffer(GL_PIXEL_PACK_BUFFER, GL_READ_ONLY);
memcpy(pixels.data(), packed, RSXThread::m_width * RSXThread::m_height * 4);
glUnmapBuffer(GL_PIXEL_PACK_BUFFER);
if (packed)
{
memcpy(pixels.data(), packed, RSXThread::m_width * RSXThread::m_height * 4);
glUnmapBuffer(GL_PIXEL_PACK_BUFFER);
checkForGlError("Flip(): glUnmapBuffer");
}
glBindBuffer(GL_PIXEL_PACK_BUFFER, 0);
src_buffer = pixels.data();