mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-06 21:36:58 +03:00
jsut a overflow protection
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
ea7dd9cfcc
commit
2349f29be0
1 changed files with 7 additions and 1 deletions
|
|
@ -113,7 +113,13 @@ class PixmapCache final : public QObject {
|
|||
if (m_consecutive_fast_evicitons >= m_consecutive_fast_evicitons_threshold) {
|
||||
// double the cache size
|
||||
auto newSize = _cacheLimit() * 2;
|
||||
qDebug() << m_consecutive_fast_evicitons << "pixmap cache misses by eviction happened too fast, doubling cache size to"
|
||||
if (newSize <= 0) { // double it until you overflow :D
|
||||
qDebug() << m_consecutive_fast_evicitons
|
||||
<< tr("pixmap cache misses by eviction happened too fast, doing nothing as the cache size reached it's limit");
|
||||
m_consecutive_fast_evicitons = 0;
|
||||
return true;
|
||||
}
|
||||
qDebug() << m_consecutive_fast_evicitons << tr("pixmap cache misses by eviction happened too fast, doubling cache size to")
|
||||
<< newSize;
|
||||
_setCacheLimit(newSize);
|
||||
m_consecutive_fast_evicitons = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue