summaryrefslogtreecommitdiff
path: root/src/compoundsprite.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-06-21 23:25:05 +0300
committerAndrei Karas <akaras@inbox.ru>2012-06-21 23:25:05 +0300
commit3f2984d27b3ca03bac760b68db64db84cd75da49 (patch)
tree645e0e11a3af58b19dd4b78dc876d85a20b26933 /src/compoundsprite.cpp
parent4fb515c4d3ec3b2109c7e406ae3169c534854513 (diff)
downloadplus-3f2984d27b3ca03bac760b68db64db84cd75da49.tar.gz
plus-3f2984d27b3ca03bac760b68db64db84cd75da49.tar.bz2
plus-3f2984d27b3ca03bac760b68db64db84cd75da49.tar.xz
plus-3f2984d27b3ca03bac760b68db64db84cd75da49.zip
Add option to enable/disable software mode compoundsprite update delay.
Diffstat (limited to 'src/compoundsprite.cpp')
-rw-r--r--src/compoundsprite.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/compoundsprite.cpp b/src/compoundsprite.cpp
index 09ac4b390..c6243c00c 100644
--- a/src/compoundsprite.cpp
+++ b/src/compoundsprite.cpp
@@ -48,6 +48,7 @@
static const unsigned cache_max_size = 10;
static const unsigned cache_clean_part = 3;
+bool CompoundSprite::mEnableDelay = true;
CompoundSprite::CompoundSprite() :
mCacheItem(nullptr),
@@ -442,10 +443,12 @@ void CompoundSprite::updateImages() const
return;
#endif
- if (get_elapsed_time1(mNextRedrawTime) < 10)
- return;
-
- mNextRedrawTime = tick_time;
+ if (mEnableDelay)
+ {
+ if (get_elapsed_time1(mNextRedrawTime) < 10)
+ return;
+ mNextRedrawTime = tick_time;
+ }
mNeedsRedraw = false;
if (!mDisableBeingCaching)