dxx-rebirth/similar
Kp 732bbd3395 Round screen width/height up to next multiple of 4
Mako88 reports incorrect images captured when using a screen resolution
of 1366x768.  1366 is not a multiple of 4.  Debugging also shows memory
corruption at this resolution, as Mesa writes off the end of the
allocated buffer.  Padding the buffer to tolerate these writes is
insufficient, as libpng then crashes with an alignment fault trying to
read unaligned data from the buffer.  All these problems are eliminated
by rounding the width and height to the next multiple of 4.

Reported-by: Mako88 <https://github.com/dxx-rebirth/dxx-rebirth/issues/373>
Fixes: 131c1b9f4d ("Add support for PNG screenshots")
2018-04-10 04:13:49 +00:00
..
2d Remove build_colormap_good parameter used 2018-03-08 04:21:18 +00:00
3d Use constexpr integral_constant for various magic numbers 2017-10-14 17:10:30 +00:00
arch Make SDL-only SDL_Surface pointers static 2018-03-02 03:19:02 +00:00
editor Pass vertex factory to compute_center_point_on_side 2018-03-12 03:43:47 +00:00
main Round screen width/height up to next multiple of 4 2018-04-10 04:13:49 +00:00
misc Replace useless printf with puts 2017-12-05 05:29:55 +00:00