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;
|
VirtualFramebuffer *vfb = 0;
|
||||||
for (size_t i = 0; i < vfbs_.size(); ++i) {
|
for (size_t i = 0; i < vfbs_.size(); ++i) {
|
||||||
VirtualFramebuffer *v = vfbs_[i];
|
VirtualFramebuffer *v = vfbs_[i];
|
||||||
if (MaskedEqual(v->fb_address, fb_address) && (g_Config.bTrueColor || v->format == fmt)) {
|
if (MaskedEqual(v->fb_address, fb_address)) {
|
||||||
// Let's not be so picky for now. Let's say this is the one.
|
// Let's not be so picky, format is enough to match.
|
||||||
vfb = v;
|
if (v->format == fmt) {
|
||||||
// Update fb stride in case it changed
|
vfb = v;
|
||||||
vfb->fb_stride = fb_stride;
|
// Update fb stride in case it changed
|
||||||
vfb->format = fmt;
|
vfb->fb_stride = fb_stride;
|
||||||
if (v->bufferWidth >= drawing_width && v->bufferHeight >= drawing_height) {
|
if (v->bufferWidth >= drawing_width && v->bufferHeight >= drawing_height) {
|
||||||
v->width = drawing_width;
|
v->width = drawing_width;
|
||||||
v->height = drawing_height;
|
v->height = drawing_height;
|
||||||
}
|
}
|
||||||
break;
|
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--);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue