mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Delete wrong format framebuffers instead.
This commit is contained in:
parent
69e4b3487b
commit
b56c9e5533
1 changed files with 16 additions and 11 deletions
|
@ -491,17 +491,22 @@ void FramebufferManager::SetRenderFrameBuffer() {
|
|||
VirtualFramebuffer *vfb = 0;
|
||||
for (size_t i = 0; i < vfbs_.size(); ++i) {
|
||||
VirtualFramebuffer *v = vfbs_[i];
|
||||
if (MaskedEqual(v->fb_address, fb_address) && (g_Config.bTrueColor || v->format == fmt)) {
|
||||
// Let's not be so picky for now. Let's say this is the one.
|
||||
vfb = v;
|
||||
// Update fb stride in case it changed
|
||||
vfb->fb_stride = fb_stride;
|
||||
vfb->format = fmt;
|
||||
if (v->bufferWidth >= drawing_width && v->bufferHeight >= drawing_height) {
|
||||
v->width = drawing_width;
|
||||
v->height = drawing_height;
|
||||
if (MaskedEqual(v->fb_address, fb_address)) {
|
||||
// Let's not be so picky, format is enough to match.
|
||||
if (v->format == fmt) {
|
||||
vfb = v;
|
||||
// Update fb stride in case it changed
|
||||
vfb->fb_stride = fb_stride;
|
||||
if (v->bufferWidth >= drawing_width && v->bufferHeight >= drawing_height) {
|
||||
v->width = drawing_width;
|
||||
v->height = drawing_height;
|
||||
}
|
||||
break;
|
||||
} else {
|
||||
// Okay, let's burn this with fire, it's the wrong format, we're replacing it.
|
||||
DestroyFramebuf(v);
|
||||
vfbs_.erase(vfbs_.begin() + i--);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue