News for hackers. Stuff that matters.
Re:The Story Behind Fenster by unwind on Monday September 09, 2024 @02:07AM (#41485882)
Very nice and very straight-forward. I really liked the part on getting "Doom" to run, impressive how easy such porting is now!

Any low-level C is kind of catnip for the old SO-powered part of my brain, but did not spend a lot of time and got a lot of confidence.i did find this bug:

    memset(f->buf, rgb, f->width*f->height*sizeoof(*f->buf));
This will not work to set a color in the general case (`rgb` is `uint32_t`) since `memset()` only uses the lower `CHAR_BIT` bits of the value, it is setting the memory byte by byte. For black or white it will work! :)

There are no comments on this comment yet.