Avoid shrinking buffer w/h in throughmode.

Since they could overdraw and we already scissor.
This commit is contained in:
Unknown W. Brackets 2014-06-14 01:56:34 -07:00
parent 5fa331bb56
commit 119edd34e6

View file

@ -869,8 +869,14 @@ void FramebufferManager::DoSetRenderFrameBuffer() {
// Update fb stride in case it changed
vfb->fb_stride = fb_stride;
v->format = fmt;
v->width = drawing_width;
v->height = drawing_height;
// In throughmode, a higher height could be used. Let's avoid shrinking the buffer.
if (gstate.isModeThrough() && (int)v->width < fb_stride) {
v->width = std::max((int)v->width, drawing_width);
v->height = std::max((int)v->height, drawing_height);
} else {
v->width = drawing_width;
v->height = drawing_height;
}
break;
}
}