mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-30 04:20:23 +00:00
Fix regression bug in SkinTheme::sliceSheet() introduced in dbad153698a552656dde17be2d9a9a203fdc1452
The skin's sprite sheet is loaded as an RGBA surface, and slices must be created as RGBA sub-surfaces.
This commit is contained in:
parent
5bbff161b9
commit
9fe53de8eb
@ -661,8 +661,6 @@ void SkinTheme::onRegenerate()
|
||||
|
||||
she::Surface* SkinTheme::sliceSheet(she::Surface* sur, const gfx::Rect& bounds)
|
||||
{
|
||||
int colordepth = 32;
|
||||
|
||||
if (sur && (sur->width() != bounds.w ||
|
||||
sur->height() != bounds.h)) {
|
||||
sur->dispose();
|
||||
@ -670,7 +668,7 @@ she::Surface* SkinTheme::sliceSheet(she::Surface* sur, const gfx::Rect& bounds)
|
||||
}
|
||||
|
||||
if (!sur)
|
||||
sur = she::instance()->createSurface(bounds.w, bounds.h);
|
||||
sur = she::instance()->createRgbaSurface(bounds.w, bounds.h);
|
||||
|
||||
{
|
||||
she::ScopedSurfaceLock src(m_sheet);
|
||||
|
Loading…
x
Reference in New Issue
Block a user