Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blitters use _screen #1602

Closed
DorpsGek opened this issue Dec 29, 2007 · 2 comments
Closed

blitters use _screen #1602

DorpsGek opened this issue Dec 29, 2007 · 2 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

SmatZ opened the ticket and wrote:

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


This issue was imported from FlySpray: https://bugs.openttd.org/task/1602
@DorpsGek
Copy link
Member Author

DorpsGek commented Jan 8, 2008

frosch wrote:

The attached patch fixes this. But I am not really happy with it, perhaps someone has a better idea.

  1. 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.

  2. 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.

  3. _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).

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1602#comment3183

@DorpsGek
Copy link
Member Author

frosch closed the ticket.

Reason for closing: Fixed

in r11813


This comment was imported from FlySpray: https://bugs.openttd.org/task/1602

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant