On Mon Jun 3 12:46:52 2024 +0000, Emil Velikov wrote:
Does we need the 256 here? Note that *Clr* and *PelsPer* bits in the header are not initialised, so we pick random values off the stack.
The buffer isn't really needed but I think it makes the code more consistent, and easier to change again later [^1]. The win32u side can also safely assume it is called with enough room for any kind of bitmap info.
Note that _Clr_ and _PelsPer_ bits in the header are not initialised, so we pick random values off the stack.
Right, I'll fix the uninitialized data, thanks. I think it should not matter with BI_RGB compression, but maybe it does.
[^1]: Several drivers only use 32bit bitmap, and that could be moved out of the drivers at some point. Even for winex11 I'm not completely sure it's worth keeping the non-32bit support, but I'm trying to keep the behavior the same for now.