Skip to content

Commit

Permalink
lix-game: Fix README text about variants; add -issue-431 variant
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhys-T committed Oct 26, 2024
1 parent 9ab0ca6 commit 77a64ab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down
4 changes: 4 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 77a64ab

Please sign in to comment.