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:
David Capello 2014-06-26 23:53:41 -03:00
parent 5bbff161b9
commit 9fe53de8eb

View File

@ -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);