mirror of
https://github.com/catmeow72/b16viewer.git
synced 2024-11-21 13:09:36 -08:00
Fix palette with 256 entries being seen as 0 entries.
This commit is contained in:
parent
10910060ec
commit
4805d60e4c
1 changed files with 2 additions and 8 deletions
10
src/main.c
10
src/main.c
|
@ -179,15 +179,9 @@ int uploadimage(const char *filename) {
|
|||
}
|
||||
printf("Border color: %02x\n", borderidx);
|
||||
printf("Reading palette entries...\n");
|
||||
for (i = 0; i < (uint16_t)significant_palette_entries*2; i++) {
|
||||
j = i >> 1;
|
||||
for (i = 0; i < (all_significant ? 512 : (uint16_t)significant_palette_entries*2); i++) {
|
||||
// Only load the required palette entries
|
||||
if (all_significant || j >= significant_palette_start && j < significant_palette_start+significant_palette_entries || j == borderidx) {
|
||||
palette[i] = read8();
|
||||
} else {
|
||||
read8();
|
||||
palette[i] = get_from_backed_up_palette(i);
|
||||
}
|
||||
palette[i+(significant_palette_start*2)] = read8();
|
||||
}
|
||||
// If the VERA was set up for a 640p image, make sure to keep track of that
|
||||
if (over320) {
|
||||
|
|
Loading…
Reference in a new issue