1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-16 16:19:10 +00:00

Fully initialize XImage ScreenBitmap with XInitImage() before using it.

This commit is contained in:
Nick Briggs 2021-08-22 18:23:41 -07:00
parent 6cad51735f
commit 81c36341ef

View File

@ -324,9 +324,11 @@ DspInterface X_init(DspInterface dsp, char *lispbitmap, int width_hint, int heig
dsp->ScreenBitmap.bitmap_bit_order = MSBFirst;
dsp->ScreenBitmap.bitmap_pad = 32;
dsp->ScreenBitmap.depth = 1;
dsp->ScreenBitmap.bits_per_pixel = 1;
dsp->ScreenBitmap.bytes_per_line =
((dsp->Display.width + (BITSPER_DLWORD - 1)) / BITSPER_DLWORD) * (BITSPER_DLWORD / 8);
break;
}
XInitImage(&dsp->ScreenBitmap);
return (dsp);
}