mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Bounding Box bugfixes.
- Fixes all (I hope) BBox-related unknown pointer crashes. - Fixes wrong BBox values with Frame Skip on (and the resulting unknown pointer crashes). - Fixes a small oversight on the change I made to the ISO Properties dialog. This should also be a (very very little) bit faster than the previous version.
This commit is contained in:
@ -37,6 +37,8 @@ u32 mapTexAddress;
|
||||
bool mapTexFound;
|
||||
int numWrites;
|
||||
|
||||
extern volatile bool g_bSkipCurrentFrame;
|
||||
|
||||
static const float s_gammaLUT[] =
|
||||
{
|
||||
1.0f,
|
||||
@ -401,7 +403,11 @@ void BPWritten(const BPCmd& bp)
|
||||
{
|
||||
if(g_ActiveConfig.bUseBBox)
|
||||
{
|
||||
// which is which? these are GUESSES!
|
||||
// Don't compute bounding box if this frame is being skipped!
|
||||
// Wrong but valid values are better than bogus values...
|
||||
if(g_bSkipCurrentFrame)
|
||||
break;
|
||||
|
||||
if (bp.address == BPMEM_CLEARBBOX1) {
|
||||
int right = bp.newvalue >> 10;
|
||||
int left = bp.newvalue & 0x3ff;
|
||||
@ -410,7 +416,6 @@ void BPWritten(const BPCmd& bp)
|
||||
PixelEngine::bbox[0] = left;
|
||||
PixelEngine::bbox[1] = right;
|
||||
PixelEngine::bbox_active = true;
|
||||
// WARN_LOG(VIDEO, "ClearBBox LR: %i, %08x - %i, %i", bp.address, bp.newvalue, left, right);
|
||||
} else {
|
||||
int bottom = bp.newvalue >> 10;
|
||||
int top = bp.newvalue & 0x3ff;
|
||||
@ -419,7 +424,6 @@ void BPWritten(const BPCmd& bp)
|
||||
PixelEngine::bbox[2] = top;
|
||||
PixelEngine::bbox[3] = bottom;
|
||||
PixelEngine::bbox_active = true;
|
||||
// WARN_LOG(VIDEO, "ClearBBox TB: %i, %08x - %i, %i", bp.address, bp.newvalue, top, bottom);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user