X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c41c20a566cb7558661a68c0ed6712a84982093f..86110e1a1917b01b23f5ac7fc0f4270f6d27a188:/src/mgl/bitmap.cpp

diff --git a/src/mgl/bitmap.cpp b/src/mgl/bitmap.cpp
index 8ab1f1f99e..b8a3f3906d 100644
--- a/src/mgl/bitmap.cpp
+++ b/src/mgl/bitmap.cpp
@@ -6,7 +6,7 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation "bitmap.h"
 #endif
 
@@ -317,7 +317,7 @@ wxBitmap::wxBitmap(const wxImage& image, int depth)
 
 wxImage wxBitmap::ConvertToImage() const
 {
-    wxCHECK_MSG( Ok(), FALSE, wxT("invalid bitmap") );
+    wxCHECK_MSG( Ok(), wxImage(), wxT("invalid bitmap") );
 
     int width, height;
     width = GetWidth();
@@ -845,8 +845,8 @@ bool wxPNGBitmapHandler::LoadFile(wxBitmap *bitmap, const wxString& name,
             s = ((wxUint32*)bmp->surface) + y * bmp->bytesPerLine/4;
             for (x = 0; x < bmp->width; x++, s ++)
             {
-                if ( ((((*s) >> bmp->pf->rsvdPos) & bmp->pf->rsvdMask) 
-                        << bmp->pf->rsvdAdjust) < 128 )
+                if ( ((((*s) >> bmp->pf->alphaPos) & bmp->pf->alphaMask) 
+                        << bmp->pf->alphaAdjust) < 128 )
                     *s = 0;
                 else
                     *s = 0x00FFFFFF; // white