1
0
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:
Nebuleon Fumika
2014-07-13 20:47:45 +00:00
committed by Maarten ter Huurne
parent bb7a30d697
commit 7284104fd1
6 changed files with 9 additions and 9 deletions

View File

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