I stiched it in but it’s pretty sketchy. This morning I knew absolutely zero about Xlib, and now I know just above zero. Nonetheless, I got 16-bit colour working… some colours still come out weird but for the most part it’s ok.
Basically stopped it from failing if there is no 24-bit display available, but will accept a 16-bit display. Then right before the blit, if display depth is 16-bit, set im->depth = 16, and then run through the image and bit shift into the correct format.
Probably is not so hot performance-wise.