libretro / gambatte-libretro

Hard fork of Gambatte to the libretro API.
http://sourceforge.net/projects/gambatte/
GNU General Public License v2.0
103 stars 78 forks source link

Custom Palettes not working with certain line endings #207

Closed kcin2001 closed 2 years ago

kcin2001 commented 2 years ago

custom palettes from standalone (at least those made on windows) will not work because the core does not support the .pal file having cr/lf line endings and instead wants lf line endings

example non working palette created from and working in standalone (remove .txt and () to use) default (cr-lf).pal.txt

example working palette that is the same file only now with line endings converted using n++ (remove .txt and () to use) default (lf).pal.txt

Sanaki commented 2 years ago

Just confirmed this. Ran unix2dos on my default palette and the core choked on the carriage returns.

[libretro INFO] [Gambatte] Using custom palette: /home/ccrowley/.config/retroarch/system/palettes/default.pal
[libretro WARN] [Gambatte] Unable to read palette color in /home/ccrowley/.config/retroarch/system/palettes/default.pal, line 1 (color left as default)
[libretro WARN] [Gambatte] Unable to read palette color in /home/ccrowley/.config/retroarch/system/palettes/default.pal, line 2 (color left as default)
[libretro WARN] [Gambatte] Unable to read palette color in /home/ccrowley/.config/retroarch/system/palettes/default.pal, line 3 (color left as default)
[libretro WARN] [Gambatte] Unable to read palette color in /home/ccrowley/.config/retroarch/system/palettes/default.pal, line 4 (color left as default)
[libretro WARN] [Gambatte] Unable to read palette color in /home/ccrowley/.config/retroarch/system/palettes/default.pal, line 5 (color left as default)
[libretro WARN] [Gambatte] Unable to read palette color in /home/ccrowley/.config/retroarch/system/palettes/default.pal, line 6 (color left as default)
[libretro WARN] [Gambatte] Unable to read palette color in /home/ccrowley/.config/retroarch/system/palettes/default.pal, line 7 (color left as default)
[libretro WARN] [Gambatte] Unable to read palette color in /home/ccrowley/.config/retroarch/system/palettes/default.pal, line 8 (color left as default)
[libretro WARN] [Gambatte] Unable to read palette color in /home/ccrowley/.config/retroarch/system/palettes/default.pal, line 9 (color left as default)
[libretro WARN] [Gambatte] Unable to read palette color in /home/ccrowley/.config/retroarch/system/palettes/default.pal, line 10 (color left as default)
[libretro WARN] [Gambatte] Unable to read palette color in /home/ccrowley/.config/retroarch/system/palettes/default.pal, line 11 (color left as default)
[libretro WARN] [Gambatte] Unable to read palette color in /home/ccrowley/.config/retroarch/system/palettes/default.pal, line 12 (color left as default)
jdgleaver commented 2 years ago

This should solve the problem: https://github.com/libretro/gambatte-libretro/pull/208 :)