From 6f3e20ac4256460ab726a4ed693718f51883fcc9 Mon Sep 17 00:00:00 2001 From: degasus Date: Sat, 22 Nov 2014 15:17:57 +0100 Subject: [PATCH] OGL: disable bbox writes if not supported --- Source/Core/VideoCommon/BPStructs.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Source/Core/VideoCommon/BPStructs.cpp b/Source/Core/VideoCommon/BPStructs.cpp index c6b57c81ca..ec7854bace 100644 --- a/Source/Core/VideoCommon/BPStructs.cpp +++ b/Source/Core/VideoCommon/BPStructs.cpp @@ -376,13 +376,18 @@ static void BPWritten(const BPCmd& bp) if (!g_bSkipCurrentFrame) { u8 offset = bp.address & 2; - - BoundingBox::coords[offset] = bp.newvalue & 0x3ff; - BoundingBox::coords[offset + 1] = bp.newvalue >> 10; BoundingBox::active = true; - g_renderer->BBoxWrite(offset, bp.newvalue & 0x3ff); - g_renderer->BBoxWrite(offset + 1, bp.newvalue >> 10); + if (g_ActiveConfig.backend_info.bSupportsBBox) + { + g_renderer->BBoxWrite(offset, bp.newvalue & 0x3ff); + g_renderer->BBoxWrite(offset + 1, bp.newvalue >> 10); + } + else + { + BoundingBox::coords[offset] = bp.newvalue & 0x3ff; + BoundingBox::coords[offset + 1] = bp.newvalue >> 10; + } } return; case BPMEM_TEXINVALIDATE: