MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / image

Method image

launcher/minecraft/mod/ResourcePack.cpp:59–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59QPixmap ResourcePack::image(QSize size)
60{
61 QPixmap cached_image;
62 if (QPixmapCache::find(m_pack_image_cache_key.key, &cached_image)) {
63 if (size.isNull())
64 return cached_image;
65 return cached_image.scaled(size);
66 }
67
68 // No valid image we can get
69 if (!m_pack_image_cache_key.was_ever_used)
70 return {};
71
72 // Imaged got evicted from the cache. Re-process it and retry.
73 ResourcePackUtils::process(*this);
74 return image(size);
75}
76
77std::pair<Version, Version> ResourcePack::compatibleVersions() const
78{

Callers

nothing calls this directly

Calls 1

processFunction · 0.50

Tested by

no test coverage detected