From 4fb515c4d3ec3b2109c7e406ae3169c534854513 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 21 Jun 2012 23:00:31 +0300 Subject: Add option for delayed OpenGL images load enable/disable. --- src/defaults.cpp | 1 + src/game.cpp | 3 ++- src/gui/setup_perfomance.cpp | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/defaults.cpp b/src/defaults.cpp index e8f421216..30cbc8a57 100644 --- a/src/defaults.cpp +++ b/src/defaults.cpp @@ -259,6 +259,7 @@ DefaultsData* getConfigDefaults() AddDEF(configData, "newtextures", true); AddDEF(configData, "videodetected", false); AddDEF(configData, "hideErased", false); + AddDEF(configData, "enableDelayedAnimations", true); return configData; } diff --git a/src/game.cpp b/src/game.cpp index 75317edac..253f9fb67 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -387,7 +387,8 @@ Game::Game(): top->add(viewport); viewport->requestMoveToBottom(); - AnimatedSprite::setEnableCache(mainGraphics->getOpenGL()); + AnimatedSprite::setEnableCache(mainGraphics->getOpenGL() + && config.getBoolValue("enableDelayedAnimations")); createGuiWindows(); diff --git a/src/gui/setup_perfomance.cpp b/src/gui/setup_perfomance.cpp index 8d6592315..e6cd75436 100644 --- a/src/gui/setup_perfomance.cpp +++ b/src/gui/setup_perfomance.cpp @@ -66,6 +66,9 @@ Setup_Perfomance::Setup_Perfomance() new SetupItemCheckBox(_("Enable map reduce (Software)"), "", "enableMapReduce", this, "enableMapReduceEvent"); + new SetupItemCheckBox(_("Enable delayed images load (OpenGL)"), "", + "enableDelayedAnimations", this, "enableDelayedAnimationsEvent"); + new SetupItemLabel(_("Better quality (disable for better perfomance)"), "", this); -- cgit v1.2.3-70-g09d2