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.
This commit is contained in:
degasus 2015-05-23 16:05:21 +02:00
parent 6b2a1e57e2
commit 029912681e
2 changed files with 1 additions and 6 deletions

View File

@ -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:

View File

@ -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);