Safety check to prevent a crash in Wipeout on Android. However, something is broken if we get here.

This commit is contained in:
Henrik Rydgard 2013-03-11 18:24:03 +01:00
parent 86683cef5e
commit 3727d1837d

View File

@ -702,8 +702,12 @@ void TextureCache::SetTexture() {
// Check for FBO - slow!
if (entry->framebuffer) {
entry->framebuffer->usageFlags |= FB_USAGE_TEXTURE;
if (entry->framebuffer->fbo){
fbo_bind_color_as_texture(entry->framebuffer->fbo, 0);
if (entry->framebuffer->fbo) {
if (!g_Config.bBufferedRendering) {
ERROR_LOG(HLE, "Buffered rendering is off! How did we end up trying to set an fbo as texture? fbo = %p", entry->framebuffer->fbo);
} else {
fbo_bind_color_as_texture(entry->framebuffer->fbo, 0);
}
} else {
glBindTexture(GL_TEXTURE_2D, 0);
gstate_c.skipDrawReason |= SKIPDRAW_BAD_FB_TEXTURE;