Skip to content

Commit

Permalink
#5527: Initialise the PNG and JPEG image handlers only, we don't need…
Browse files Browse the repository at this point in the history
… the rest for loading our local icons and bitmaps.
  • Loading branch information
codereader committed Feb 7, 2021
1 parent 11cd8c2 commit c961681
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion radiant/RadiantApp.cpp
Expand Up @@ -122,7 +122,13 @@ void RadiantApp::initWxWidgets()
// Our XRC resource files are stored in the ui/ folder.
wxXmlResource::Get()->Load(_context.getRuntimeDataPath() + "ui/*.xrc");

wxInitAllImageHandlers();
// We only need PNG and JPEG for our local images. BMP is enabled by default.
#if wxUSE_LIBPNG
wxImage::AddHandler(new wxPNGHandler);
#endif
#if wxUSE_LIBJPEG
wxImage::AddHandler(new wxJPEGHandler);
#endif

// Register the local art provider
_bitmapArtProvider = std::make_unique<wxutil::LocalBitmapArtProvider>(_context.getBitmapsPath());
Expand Down

0 comments on commit c961681

Please sign in to comment.