forked from shauninman/MinUI
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GB: use lightest palette color for grid, sdl2-only
requires gambatte patch to write the color to "/tmp/dmg_grid_color" which minarch watches for changes to after the "palette" option changes
- Loading branch information
Shaun Inman
committed
Dec 6, 2024
1 parent
b456975
commit 5051ace
Showing
12 changed files
with
576 additions
and
209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
workspace/all/cores/patches/gambatte/001-export-dmg-grid-color-on-change.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
diff --git forkSrcPrefix/libgambatte/libretro/libretro.cpp forkDstPrefix/libgambatte/libretro/libretro.cpp | ||
index 74b2b1dd0bb3f76b77a616ebac2485ba09565467..caa2d1ef21235ffb09ad22440266495d99d9be4e 100644 | ||
--- forkSrcPrefix/libgambatte/libretro/libretro.cpp | ||
+++ forkDstPrefix/libgambatte/libretro/libretro.cpp | ||
@@ -2387,6 +2387,12 @@ static void check_variables(bool startup) | ||
{ | ||
rgb32 = gb.gbcToRgb32(gbc_bios_palette[palnum * 4 + colornum]); | ||
gb.setDmgPaletteColor(palnum, colornum, rgb32); | ||
+ | ||
+ if (palnum==0 && colornum==0) { | ||
+ char cmd[32]; | ||
+ sprintf(cmd, "echo %i > /tmp/dmg_grid_color", rgb32); | ||
+ system(cmd); | ||
+ } | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.