1
0
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:
Michał Janiszewski
2022-04-09 12:12:34 +02:00
committed by GitHub
parent e9213e3ecf
commit fd4e6bd031

View File

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