From 77a64ab37ff015b05eef9b23442d4eefe5dd6bf1 Mon Sep 17 00:00:00 2001 From: Rhys-T <108157737+Rhys-T@users.noreply.github.com> Date: Sat, 26 Oct 2024 18:46:35 -0400 Subject: [PATCH] lix-game: Fix README text about variants; add `-issue-431` variant --- README.md | 2 +- default.nix | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f24105f..ed02e30 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ On macOS, upstream is affected by a [bug](https://github.com/SimonN/LixD/issues/ However, as far as I know there's no guarantee that NSImage will keep treating true-color images the same way in future macOS versions, meaning this workaround could break eventually - and it doesn't do anything for custom images installed in `${XDG_DATA_HOME:-$HOME/.local/share}/lix`. -Therefore, I also have an alternative workaround implemented. If you set `convertImagesToTrueColor` to `false`, Lix will instead be linked against a custom build of Allegro 5 which has the macOS native image loader disabled, and instead uses the same `libpng`-based method as on Linux and Windows, avoiding the bug. To prevent this as well (for instance, to test out the bug's behavior on a given version of macOS), additionally set `disableNativeImageLoader` to `false` (or just use `lix-game-libpng`). +Therefore, I also have an alternative workaround implemented. If you set `convertImagesToTrueColor` to `false` (or just use `lix-game-libpng`), Lix will instead be linked against a custom build of Allegro 5 which has the macOS native image loader disabled, and instead uses the same `libpng`-based method as on Linux and Windows, avoiding the bug. To prevent this as well (for instance, to test out the bug's behavior on a given version of macOS), additionally set `disableNativeImageLoader` to `false` (or use `lix-game-issue-431`). You can also set `disableNativeImageLoader` to `"CIImage"` (or use `lix-game-CIImage`) to test out @pedro-w's [CIImage-based loader](https://github.com/liballeg/allegro5/issues/1531#issuecomment-1950198051). diff --git a/default.nix b/default.nix index d8cc8f4..97337a4 100644 --- a/default.nix +++ b/default.nix @@ -41,6 +41,10 @@ in { lix-game-libpng = if pkgs.hostPlatform.isDarwin then (self.lix-game-packages.overrideScope (self: super: { convertImagesToTrueColor = false; })).game else self.lix-game; + lix-game-issue-431 = if pkgs.hostPlatform.isDarwin then (self.lix-game-packages.overrideScope (self: super: { + convertImagesToTrueColor = false; + disableNativeImageLoader = false; + })).game else self.lix-game; lix-game-CIImage = if pkgs.hostPlatform.isDarwin then (self.lix-game-packages.overrideScope (self: super: { convertImagesToTrueColor = false; disableNativeImageLoader = "CIImage";