mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-27 21:19:18 +00:00
Fix problem getting pixels in non-32bpp Allegro BITMAPs
Regression introduced in 5e3ba8237a
This changed was needed to load certain .png fonts correctly in the
SkinTheme.
This commit is contained in:
parent
d5fea43972
commit
4ebefd3f13
@ -211,6 +211,8 @@ int geta_depth(int color_depth, int c)
|
|||||||
if (color_depth == 32)
|
if (color_depth == 32)
|
||||||
return geta32(c);
|
return geta32(c);
|
||||||
|
|
||||||
|
/* dacap: This should return 255, anyway as the Debian port uses
|
||||||
|
the official Allegro library, we cannot depend on this function. */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +73,8 @@ inline gfx::Color from_allegro(int color_depth, int color)
|
|||||||
getr_depth(color_depth, color),
|
getr_depth(color_depth, color),
|
||||||
getg_depth(color_depth, color),
|
getg_depth(color_depth, color),
|
||||||
getb_depth(color_depth, color),
|
getb_depth(color_depth, color),
|
||||||
geta_depth(color_depth, color));
|
// This condition is here because geta_depth() returns 0 if color depth != 32
|
||||||
|
(color_depth == 32 ? geta32(color): 255));
|
||||||
}
|
}
|
||||||
|
|
||||||
Alleg4Surface::Alleg4Surface(BITMAP* bmp, DestroyFlag destroy)
|
Alleg4Surface::Alleg4Surface(BITMAP* bmp, DestroyFlag destroy)
|
||||||
|
Loading…
Reference in New Issue
Block a user