Skip to content

Commit

Permalink
Revert "Attempted workaround for issue #2308. Needs plenty of testing…
Browse files Browse the repository at this point in the history
…! Fixes black screens in GTA when pausing for example."

This reverts commit f2b7096.
  • Loading branch information
hrydgard committed Jun 19, 2013
1 parent f2b7096 commit 283f382
Showing 1 changed file with 6 additions and 24 deletions.
30 changes: 6 additions & 24 deletions GPU/GLES/Framebuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.

#include <algorithm>

#include "gfx_es2/glsl_program.h"
#include "gfx_es2/gl_state.h"
#include "gfx_es2/fbo.h"
Expand Down Expand Up @@ -356,28 +354,12 @@ void FramebufferManager::SetRenderFrameBuffer() {
VirtualFramebuffer *vfb = 0;
for (auto iter = vfbs_.begin(); iter != vfbs_.end(); ++iter) {
VirtualFramebuffer *v = *iter;
if (MaskedEqual(v->fb_address, fb_address) && v->format == fmt) {
// Okay, let's check the sizes. If the new one is bigger than the old one, recreate.
// If the opposite, just use it and hope that the game sets scissors accordingly.
if (v->width >= drawing_width && v->height >= drawing_height) {
// 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;
// Just hack the width/height and we should be fine. also hack renderwidth/renderheight?
v->width = drawing_width;
v->height = drawing_height;
break;
} else {
INFO_LOG(HLE, "Embiggening framebuffer (%i, %i) -> (%i, %i)", (int)v->width, (int)v->height, drawing_width, drawing_height);
// drawing_width or drawing_height is bigger. Let's recreate with the max.
// To do this right we should copy the data over too, but meh.
drawing_width = std::max((int)v->width, drawing_width);
drawing_height = std::max((int)v->height, drawing_height);
delete v;
vfbs_.erase(iter);
break;
}
if (MaskedEqual(v->fb_address, fb_address) && v->width == drawing_width && v->height == drawing_height && 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;
break;
}
}

Expand Down

0 comments on commit 283f382

Please sign in to comment.