aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkhonkhortisan <khonkhortisan@gmail.com>2013-03-30 14:49:46 -0700
committerkwolekr <kwolekr@minetest.net>2013-03-30 21:52:13 -0400
commit96387ee88a89d172fa23ef325a15da510afac3e5 (patch)
treee9af0998436f3f0c0ac6d9b64c0bfc4e9d932aad
parent23590a8383f068509265d5724458c7966d71a0e3 (diff)
downloadminetest-96387ee88a89d172fa23ef325a15da510afac3e5.tar.gz
minetest-96387ee88a89d172fa23ef325a15da510afac3e5.tar.bz2
minetest-96387ee88a89d172fa23ef325a15da510afac3e5.zip
Don't load menu textures every frame
-rw-r--r--src/main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 2e57a8c20..439b59d31 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -618,7 +618,7 @@ void drawMenuBackground(video::IVideoDriver* driver) {
std::string path = getTexturePath("menubg.png");
if (path[0]) {
- video::ITexture *bgtexture =
+ static const video::ITexture *bgtexture =
driver->getTexture(path.c_str());
if (bgtexture) {
@@ -646,7 +646,7 @@ void drawMenuFooter(video::IVideoDriver* driver, bool clouds) {
std::string path = getTexturePath(clouds ?
"menufooter_clouds.png" : "menufooter.png");
if (path[0]) {
- video::ITexture *footertexture =
+ static const video::ITexture *footertexture =
driver->getTexture(path.c_str());
if (footertexture) {
@@ -678,7 +678,7 @@ void drawMenuHeader(video::IVideoDriver* driver) {
std::string path = getTexturePath("menuheader.png");
if (path[0]) {
- video::ITexture *splashtexture =
+ static const video::ITexture *splashtexture =
driver->getTexture(path.c_str());
if(splashtexture) {
@@ -713,7 +713,7 @@ void drawMenuHeader(video::IVideoDriver* driver) {
void drawMenuSplash(video::IVideoDriver* driver) {
core::dimension2d<u32> screensize = driver->getScreenSize();
if (getTexturePath("menusplash.png") != "") {
- video::ITexture *splashtexture =
+ static const video::ITexture *splashtexture =
driver->getTexture(getTexturePath("menusplash.png").c_str());
if(splashtexture) {