Handle a case of 480x360 framebuffers.
Region and scissor are 480x360, but viewport is just default (also, throughmode is on.) We could add more checks, but just the height being a bit higher is already unusual, so should be relatively safe. Fixes #7277.
This commit is contained in:
parent
c4c581000f
commit
06e9d7680a
2 changed files with 6 additions and 4 deletions
|
@ -122,7 +122,9 @@ void FramebufferManagerCommon::EstimateDrawingSize(int &drawing_width, int &draw
|
|||
drawing_height = 272;
|
||||
}
|
||||
// Sometimes region is set larger than the VRAM for the framebuffer.
|
||||
if (region_width <= fb_stride && region_width > drawing_width && region_height <= MAX_FRAMEBUF_HEIGHT) {
|
||||
// However, in one game it's correctly set as a larger height (see #7277) with the same width.
|
||||
// A bit of a hack, but we try to handle that unusual case here.
|
||||
if (region_width <= fb_stride && (region_width > drawing_width || (region_width == drawing_width && region_height > drawing_height)) && region_height <= MAX_FRAMEBUF_HEIGHT) {
|
||||
drawing_width = region_width;
|
||||
drawing_height = std::max(drawing_height, region_height);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue