Fix loading of 512-palette file
This commit is contained in:
committed by
LibretroAdmin
parent
9f53af4e33
commit
449db5de6b
@@ -186,9 +186,9 @@ void FCEU_LoadGamePalette(void) {
|
|||||||
int x;
|
int x;
|
||||||
int ssize = filestream_get_size(fp);
|
int ssize = filestream_get_size(fp);
|
||||||
int nEntries = ssize / 3;
|
int nEntries = ssize / 3;
|
||||||
filestream_read(fp, ptmp, nEntries);
|
filestream_read(fp, ptmp, ssize);
|
||||||
filestream_close(fp);
|
filestream_close(fp);
|
||||||
for (x = 0; x < 64; x++) {
|
for (x = 0; x < nEntries; x++) {
|
||||||
palette_game[x].r = ptmp[x + x + x];
|
palette_game[x].r = ptmp[x + x + x];
|
||||||
palette_game[x].g = ptmp[x + x + x + 1];
|
palette_game[x].g = ptmp[x + x + x + 1];
|
||||||
palette_game[x].b = ptmp[x + x + x + 2];
|
palette_game[x].b = ptmp[x + x + x + 2];
|
||||||
|
|||||||
Reference in New Issue
Block a user