mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2025-04-21 12:27:27 +03:00
Fix issues with loading images with alpha disabled.
These issues are fixed: * loadPNG gave RGBA surfaces unconditionally. Now it gives RGB surfaces if its second parameter, defaulting to true, is false. This fixes adding per- surface alpha values, because an RGBA surface ignores its per-surface value. * Surface::loadImage is updated to receive a third parameter, defaulting to true, to determine whether alpha is loaded. * SurfaceCollection::defaultAlpha was never used. * SurfaceCollection::defaultAlpha defaulted to false, so even if it were used, it would have loaded images without alpha.
This commit is contained in:
committed by
Maarten ter Huurne
parent
bb7a30d697
commit
7284104fd1
@@ -42,7 +42,7 @@ public:
|
||||
static std::string getSkinFilePath(const std::string &skin, const std::string &file, bool useDefault = true);
|
||||
static std::string getSkinPath(const std::string &skin);
|
||||
|
||||
bool defaultAlpha;
|
||||
bool defaultAlpha = true;
|
||||
void debug();
|
||||
|
||||
Surface *add(Surface *s, const std::string &path);
|
||||
|
||||
Reference in New Issue
Block a user