mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Fix crash in SoftGPU when frameskipping, noticed by sum2012 in Daxter
Fixes #17021
This commit is contained in:
parent
e9182a6e04
commit
c6352a262d
1 changed files with 3 additions and 0 deletions
|
@ -670,6 +670,9 @@ void SoftGPU::MarkDirty(uint32_t addr, uint32_t bytes, SoftGPUVRAMDirty value) {
|
|||
|
||||
uint32_t start = ((addr - PSP_GetVidMemBase()) & 0x001FFFFF) >> 10;
|
||||
uint32_t end = start + ((bytes + 1023) >> 10);
|
||||
if (end > sizeof(vramDirty_)) {
|
||||
end = sizeof(vramDirty_);
|
||||
}
|
||||
if (value == SoftGPUVRAMDirty::CLEAR || value == (SoftGPUVRAMDirty::DIRTY | SoftGPUVRAMDirty::REALLY_DIRTY)) {
|
||||
memset(vramDirty_ + start, (uint8_t)value, end - start);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue