From 029912681e1f6a17ad68f8593c78d514b863724c Mon Sep 17 00:00:00 2001 From: degasus Date: Sat, 23 May 2015 16:05:21 +0200 Subject: [PATCH] VideoCommon: return 0 if bbox is disabled Through just returning the last written value sounds better, this crashes Paper Mario. In my opinion, gfx issues are fine on older GPUs, but crashes should not happen. --- Source/Core/VideoCommon/BPStructs.cpp | 5 ----- Source/Core/VideoCommon/MainBase.cpp | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/Source/Core/VideoCommon/BPStructs.cpp b/Source/Core/VideoCommon/BPStructs.cpp index 29913559c6..7148b2a0cc 100644 --- a/Source/Core/VideoCommon/BPStructs.cpp +++ b/Source/Core/VideoCommon/BPStructs.cpp @@ -384,11 +384,6 @@ static void BPWritten(const BPCmd& bp) 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: diff --git a/Source/Core/VideoCommon/MainBase.cpp b/Source/Core/VideoCommon/MainBase.cpp index 1454d88ca0..e06ce3c84e 100644 --- a/Source/Core/VideoCommon/MainBase.cpp +++ b/Source/Core/VideoCommon/MainBase.cpp @@ -153,7 +153,7 @@ u32 VideoBackendHardware::Video_GetQueryResult(PerfQueryType type) u16 VideoBackendHardware::Video_GetBoundingBox(int index) { if (!g_ActiveConfig.backend_info.bSupportsBBox || !g_ActiveConfig.bBBoxEnable) - return BoundingBox::coords[index]; + return 0; SyncGPU(SYNC_GPU_BBOX);