MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / updateCacheSize

Method updateCacheSize

pcsx2-qt/GameList/GameListModel.cpp:115–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115void GameListModel::updateCacheSize(int width, int height)
116{
117 // This is a bit conversative, since it doesn't consider padding, but better to be over than under.
118 const int cover_width = getCoverArtWidth();
119 const int cover_height = getCoverArtHeight();
120 const int num_columns = ((width + (cover_width - 1)) / cover_width);
121 const int num_rows = ((height + (cover_height - 1)) / cover_height);
122 m_cover_pixmap_cache.SetMaxCapacity(static_cast<int>(std::max(num_columns * num_rows, MIN_COVER_CACHE_SIZE)));
123}
124
125void GameListModel::setDevicePixelRatio(qreal dpr)
126{

Callers 3

initializeMethod · 0.80
onCoverScaleChangedMethod · 0.80
resizeEventMethod · 0.80

Calls 2

SetMaxCapacityMethod · 0.80
maxFunction · 0.50

Tested by

no test coverage detected