GPU: Fix bug where the backlight intensity would be incorrectly averaged if frameskipping is enabled. (Regression from commit f5c9a36.)
This commit is contained in:
parent
6ca2dbe6d0
commit
f4c01c4b57
|
@ -8115,11 +8115,9 @@ void GPUSubsystem::RenderLine(const size_t l)
|
||||||
this->_displayInfo.needConvertColorFormat[NDSDisplayID_Main] = (OUTPUTFORMAT == NDSColorFormat_BGR666_Rev);
|
this->_displayInfo.needConvertColorFormat[NDSDisplayID_Main] = (OUTPUTFORMAT == NDSColorFormat_BGR666_Rev);
|
||||||
this->_displayInfo.needConvertColorFormat[NDSDisplayID_Touch] = (OUTPUTFORMAT == NDSColorFormat_BGR666_Rev);
|
this->_displayInfo.needConvertColorFormat[NDSDisplayID_Touch] = (OUTPUTFORMAT == NDSColorFormat_BGR666_Rev);
|
||||||
|
|
||||||
// Set the average backlight intensity and then reset the current total.
|
// Set the average backlight intensity over 263 H-blanks.
|
||||||
this->_displayInfo.backlightIntensity[NDSDisplayID_Main] = this->_backlightIntensityTotal[NDSDisplayID_Main] / 263.0f;
|
this->_displayInfo.backlightIntensity[NDSDisplayID_Main] = this->_backlightIntensityTotal[NDSDisplayID_Main] / 263.0f;
|
||||||
this->_displayInfo.backlightIntensity[NDSDisplayID_Touch] = this->_backlightIntensityTotal[NDSDisplayID_Touch] / 263.0f;
|
this->_displayInfo.backlightIntensity[NDSDisplayID_Touch] = this->_backlightIntensityTotal[NDSDisplayID_Touch] / 263.0f;
|
||||||
this->_backlightIntensityTotal[NDSDisplayID_Main] = 0.0f;
|
|
||||||
this->_backlightIntensityTotal[NDSDisplayID_Touch] = 0.0f;
|
|
||||||
|
|
||||||
this->_engineMain->UpdateMasterBrightnessDisplayInfo(this->_displayInfo);
|
this->_engineMain->UpdateMasterBrightnessDisplayInfo(this->_displayInfo);
|
||||||
this->_engineSub->UpdateMasterBrightnessDisplayInfo(this->_displayInfo);
|
this->_engineSub->UpdateMasterBrightnessDisplayInfo(this->_displayInfo);
|
||||||
|
@ -8137,6 +8135,10 @@ void GPUSubsystem::RenderLine(const size_t l)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Reset the current backlight intensity total.
|
||||||
|
this->_backlightIntensityTotal[NDSDisplayID_Main] = 0.0f;
|
||||||
|
this->_backlightIntensityTotal[NDSDisplayID_Touch] = 0.0f;
|
||||||
|
|
||||||
if (this->_frameNeedsFinish)
|
if (this->_frameNeedsFinish)
|
||||||
{
|
{
|
||||||
this->_frameNeedsFinish = false;
|
this->_frameNeedsFinish = false;
|
||||||
|
|
Loading…
Reference in New Issue