summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-26 01:27:16 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-26 01:27:16 +0300
commitb661524e8b7b41cec237492ecd52fdda7b9be394 (patch)
tree94bb6290dcb5cdc0f63747f4b97f1b5714175971
parent6f8da91cf4af4057ae4d2b9a2e2cd654e54d2d2c (diff)
downloadmv-b661524e8b7b41cec237492ecd52fdda7b9be394.tar.gz
mv-b661524e8b7b41cec237492ecd52fdda7b9be394.tar.bz2
mv-b661524e8b7b41cec237492ecd52fdda7b9be394.tar.xz
mv-b661524e8b7b41cec237492ecd52fdda7b9be394.zip
Disable being caching in soft mode in SDL2.
-rw-r--r--src/compoundsprite.cpp9
-rw-r--r--src/gui/setup_perfomance.cpp3
2 files changed, 7 insertions, 5 deletions
diff --git a/src/compoundsprite.cpp b/src/compoundsprite.cpp
index 6e8d47373..e89e1154b 100644
--- a/src/compoundsprite.cpp
+++ b/src/compoundsprite.cpp
@@ -313,10 +313,7 @@ unsigned int CompoundSprite::getFrameCount(unsigned int layer)
void CompoundSprite::redraw() const
{
-#ifdef USE_SDL2
- // +++ need impliment after
- return;
-#else
+#ifndef USE_SDL2
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
const int rmask = 0xff000000;
@@ -417,6 +414,7 @@ void CompoundSprite::setAlpha(float alpha)
void CompoundSprite::updateImages() const
{
+#ifndef USE_SDL2
#ifdef USE_OPENGL
if (imageHelper->useOpenGL())
return;
@@ -450,10 +448,12 @@ void CompoundSprite::updateImages() const
redraw();
}
}
+#endif
}
bool CompoundSprite::updateFromCache() const
{
+#ifndef USE_SDL2
// static int hits = 0;
// static int miss = 0;
@@ -516,6 +516,7 @@ bool CompoundSprite::updateFromCache() const
mImage = nullptr;
mAlphaImage = nullptr;
// miss++;
+#endif
return false;
}
diff --git a/src/gui/setup_perfomance.cpp b/src/gui/setup_perfomance.cpp
index 17dec597e..c58240af9 100644
--- a/src/gui/setup_perfomance.cpp
+++ b/src/gui/setup_perfomance.cpp
@@ -122,6 +122,7 @@ Setup_Perfomance::Setup_Perfomance(const Widget2 *const widget) :
new SetupItemLabel(_("Small memory (enable for lower memory usage)"),
"", this);
+#ifndef USE_SDL2
// TRANSLATORS: settings option
new SetupItemCheckBox(_("Disable advanced beings caching (Software)"), "",
"disableAdvBeingCaching", this, "disableAdvBeingCachingEvent");
@@ -129,7 +130,7 @@ Setup_Perfomance::Setup_Perfomance(const Widget2 *const widget) :
// TRANSLATORS: settings option
new SetupItemCheckBox(_("Disable beings caching (Software)"), "",
"disableBeingCaching", this, "disableBeingCachingEvent");
-
+#endif
// TRANSLATORS: settings group
new SetupItemLabel(_("Different options (enable or disable can "