mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-04 05:15:21 +00:00
(svn r10243) -Fix: crash when resizing with 32bpp and 'broken' display with 'non-standard' resolutions
This commit is contained in:
parent
1fa725ecae
commit
edf68a04b0
@ -663,7 +663,7 @@ static bool AllocateDibSection(int w, int h)
|
||||
return false;
|
||||
|
||||
_screen.width = w;
|
||||
_screen.pitch = ALIGN(w, 4);
|
||||
_screen.pitch = (bpp == 8) ? ALIGN(w, 4) : w;
|
||||
_screen.height = h;
|
||||
bi = (BITMAPINFO*)alloca(sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD) * 256);
|
||||
memset(bi, 0, sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD) * 256);
|
||||
|
Loading…
Reference in New Issue
Block a user