mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
Increase colour refcount when allocating colour
svn-id: r38974
This commit is contained in:
parent
2d1a6309f8
commit
c388d6c455
@ -292,6 +292,8 @@ int gfx_alloc_color(gfx_palette_t *pal, gfx_pixmap_color_t *color) {
|
||||
|
||||
if (dr == 0 && dg == 0 && db == 0) {
|
||||
color->global_index = i;
|
||||
if (pal->colors[i].lockers != GFX_COLOR_SYSTEM)
|
||||
pal->colors[i].lockers++;
|
||||
return GFX_OK;
|
||||
}
|
||||
|
||||
@ -316,6 +318,8 @@ int gfx_alloc_color(gfx_palette_t *pal, gfx_pixmap_color_t *color) {
|
||||
}
|
||||
|
||||
color->global_index = bestcolor;
|
||||
if (pal->colors[bestcolor].lockers != GFX_COLOR_SYSTEM)
|
||||
pal->colors[bestcolor].lockers++;
|
||||
|
||||
//GFXWARN("Out of palette colors- doing approximated mapping");
|
||||
return GFX_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user