You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Resulting in for example buggy giant screenshots in 8bpp mode and segfaults in 32bpp mode (Blitter::DrawRect uses _screen.pitch, that is different from encoder buffer pitch).
Reported version: 0.6.0-beta1 Operating system: All
The attached patch fixes this. But I am not really happy with it, perhaps someone has a better idea.
The bug applies to some more functions, not only DrawRect. So removing the usage of _screen.pitch does not seem to be a adequate solution. 32bpp-anim contains another related bug, that is also fixed.
The patch introduces a global variable _giant_screenshot, that is used in the 32bpp-anim blitter to turn off usage of the anim_buffer during giant screenshots. A alternative way would be the test, that gets removed in line 21 of the patch. But I dislike that one even more.
_screen.pitch is modified during the giant screenshot. Perhaps it would be nicer to also modify _screen.dst_ptr/.width/.height. That way _screen would remain more consistent, but the fields are only used, when drawing GUI elements, charts and the smallmap. And it would also disable the alternative way in 2).
SmatZ opened the ticket and wrote:
Reported version: 0.6.0-beta1
Operating system: All
This issue was imported from FlySpray: https://bugs.openttd.org/task/1602
The text was updated successfully, but these errors were encountered: