Also in macOS 10.14, something changed in the internals of how macOS started programs that made almost every SDL1-based program in the world fail utterly, displaying only a black screen.By this point we had dropped PowerPC support, and the number of Macs that could run i386 code but not x86_64 code was always miniscule. That didn’t require any changes to the source code, but it did mean that we had to rebuild everything for x86_64. In macOS 10.14, 32-bit code was deprecated, and in 10.15 it was completely removed.We solved this for a time sticking to an extremely old version of SDL_image, and then later shipped with a special build configured to use libpng again anyway. UQM’s graphics rely on palette information for color-cycling animations and hit detection, so this basically ruined everything. That would be fine, but unfortunately ImageIO destroys palette information, automatically converting all images to 32-bit RGBA color as part of the loading process. Over its lifespan, the SDL_image library stopped using the libpng reference implementation to load PNG images, and instead switched to Apple’s native ImageIO framework.We could fix that simply enough by upgrading the version of SDL that we used, in place. SDL for Mac originally used the QuickDraw libraries to handle its pixel-level graphics, and in macOS 10.12 we started crashing on startup because even checking for the existence of the QuickDraw libraries caused the OS to kill us. The macOS builds of UQM had required a number of changes over the years that did not require changes to our source code: The rest of this post is an after-the-fact dev diary about the changes I needed to do to modernize the UQM backend, the bugs that I hit along the way, and what the project ultimately gained. I was going to need to preserve all that, too. Furthermore, most of the code that’s there, even the very old hardware libraries, was still basically fine. The last time there was a proper release of UQM was also nearly 10 years ago, with a number of other experiments and features we worked on but never tested enough to be happy shipping.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |