From 3f2984d27b3ca03bac760b68db64db84cd75da49 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 21 Jun 2012 23:25:05 +0300 Subject: Add option to enable/disable software mode compoundsprite update delay. --- src/compoundsprite.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/compoundsprite.cpp') 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) -- cgit v1.2.3-60-g2f50