mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 00:54:53 -07:00
Limit pixmap cache size to 2047MB; fix #555
also, fix any invalid values loaded from config
This commit is contained in:
parent
8e396cadc2
commit
24c6e4a81d
3 changed files with 9 additions and 2 deletions
|
|
@ -52,8 +52,9 @@ GeneralSettingsPage::GeneralSettingsPage()
|
|||
|
||||
pixmapCacheLabel = new QLabel;
|
||||
pixmapCacheEdit = new QSpinBox;
|
||||
pixmapCacheEdit->setMinimum(64);
|
||||
pixmapCacheEdit->setMaximum(8192);
|
||||
pixmapCacheEdit->setMinimum(PIXMAPCACHE_SIZE_MIN);
|
||||
// 2047 is the max value to avoid overflowing of QPixmapCache::setCacheLimit(int size)
|
||||
pixmapCacheEdit->setMaximum(PIXMAPCACHE_SIZE_MAX);
|
||||
pixmapCacheEdit->setSingleStep(64);
|
||||
pixmapCacheEdit->setValue(settingsCache->getPixmapCacheSize());
|
||||
pixmapCacheEdit->setSuffix(" MB");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue