mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
Fix crash after alt-tab (#16070)
This commit is contained in:
committed by
GitHub
parent
e9213e3ecf
commit
fd4e6bd031
@@ -527,6 +527,10 @@ void lightfx_render_lights_to_frontbuffer()
|
||||
continue;
|
||||
}
|
||||
|
||||
// Clamp the reads to be no larger than the buffer size
|
||||
bufReadHeight = std::min<uint32_t>(_pixelInfo.height, bufReadHeight);
|
||||
bufReadWidth = std::min<uint32_t>(_pixelInfo.width, bufReadWidth);
|
||||
|
||||
bufWriteX = inRectCentreX - bufReadWidth / 2;
|
||||
bufWriteY = inRectCentreY - bufReadHeight / 2;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user