]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mgl/bitmap.cpp
better focus handling (blind fix)
[wxWidgets.git] / src / mgl / bitmap.cpp
index 1e685b40cad07a7fbf45eb78f13d8eef5cbf0642..4e9e1051eb01dbe7faa9f8d32b361186c58a2fc1 100644 (file)
@@ -48,10 +48,6 @@ static pixel_format_t gs_pixel_format_24 =
 static pixel_format_t gs_pixel_format_32 =
        {0xFF,0x18,0, 0xFF,0x10,0, 0xFF,0x08,0, 0xFF,0x00,0}; // RGBA 32bpp
 
 static pixel_format_t gs_pixel_format_32 =
        {0xFF,0x18,0, 0xFF,0x10,0, 0xFF,0x08,0, 0xFF,0x00,0}; // RGBA 32bpp
 
-// FIXME_MGL -- these formats will probably have to go into another place,
-//              where wxApp could use them to initialize g_displayDC
-
-
 //-----------------------------------------------------------------------------
 // wxMask
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 // wxMask
 //-----------------------------------------------------------------------------
@@ -306,7 +302,7 @@ wxImage wxBitmap::ConvertToImage() const
 {
     wxCHECK_MSG( Ok(), FALSE, wxT("invalid bitmap") );
 
 {
     wxCHECK_MSG( Ok(), FALSE, wxT("invalid bitmap") );
 
-    long width, height;
+    int width, height;
     width = GetWidth();
     height = GetHeight();
     
     width = GetWidth();
     height = GetHeight();
     
@@ -517,6 +513,7 @@ MGLDevCtx *wxBitmap::CreateTmpDC() const
             case  4: cnt = 16;  break;
             case  8: cnt = 256; break;
             default:
             case  4: cnt = 16;  break;
             case  8: cnt = 256; break;
             default:
+                cnt = 0;
                 wxFAIL_MSG( wxT("bitmap with this depth cannot have palette") );
                 break;
         }
                 wxFAIL_MSG( wxT("bitmap with this depth cannot have palette") );
                 break;
         }