X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14f355c2b5c71fc7c3d680aea366582d2ac60f7b..b04683b19e5cca2747f9ad565b42c5f1545838bc:/src/common/artprov.cpp diff --git a/src/common/artprov.cpp b/src/common/artprov.cpp index e4c829757b..9c3fda0143 100644 --- a/src/common/artprov.cpp +++ b/src/common/artprov.cpp @@ -32,10 +32,9 @@ #include "wx/artprov.h" #include "wx/hashmap.h" #include "wx/module.h" +#if wxUSE_IMAGE #include "wx/image.h" - -// For the purposes of forcing this module to link -extern char g_ArtProviderModule; +#endif // =========================================================================== // implementation @@ -84,9 +83,6 @@ bool wxArtProviderCache::GetBitmap(const wxString& full_id, wxBitmap* bmp) void wxArtProviderCache::Clear() { - // Hack to make the default provider link - // with the application - g_ArtProviderModule = 0; m_bitmapsHash.clear(); } @@ -173,6 +169,7 @@ wxArtProviderCache *wxArtProvider::sm_cache = NULL; bmp = node->GetData()->CreateBitmap(id, client, size); if ( bmp.Ok() ) { +#if wxUSE_IMAGE if ( size != wxDefaultSize && (bmp.GetWidth() != size.x || bmp.GetHeight() != size.y) ) { @@ -180,6 +177,7 @@ wxArtProviderCache *wxArtProvider::sm_cache = NULL; img.Rescale(size.x, size.y); bmp = wxBitmap(img); } +#endif break; } } @@ -212,6 +210,7 @@ public: bool OnInit() { wxArtProvider::InitStdProvider(); + wxArtProvider::InitNativeProvider(); return TRUE; } void OnExit()