summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/tilereg.cc5
-rw-r--r--crawl-ref/source/tilereg.h2
-rw-r--r--crawl-ref/source/tilesdl.cc6
3 files changed, 9 insertions, 4 deletions
diff --git a/crawl-ref/source/tilereg.cc b/crawl-ref/source/tilereg.cc
index 7e559d1b79..aa4bed5b7c 100644
--- a/crawl-ref/source/tilereg.cc
+++ b/crawl-ref/source/tilereg.cc
@@ -3618,9 +3618,10 @@ ImageManager::~ImageManager()
unload_textures();
}
-bool ImageManager::load_textures()
+bool ImageManager::load_textures(bool need_mips)
{
- GenericTexture::MipMapOptions mip = GenericTexture::MIPMAP_CREATE;
+ GenericTexture::MipMapOptions mip = need_mips ?
+ GenericTexture::MIPMAP_CREATE : GenericTexture::MIPMAP_NONE;
if (!m_textures[TEX_DUNGEON].load_texture("dngn.png", mip))
return (false);
diff --git a/crawl-ref/source/tilereg.h b/crawl-ref/source/tilereg.h
index 3ea855a493..92eacc40eb 100644
--- a/crawl-ref/source/tilereg.h
+++ b/crawl-ref/source/tilereg.h
@@ -25,7 +25,7 @@ public:
ImageManager();
virtual ~ImageManager();
- bool load_textures();
+ bool load_textures(bool need_mips);
bool load_item_texture();
void unload_textures();
diff --git a/crawl-ref/source/tilesdl.cc b/crawl-ref/source/tilesdl.cc
index f49bc3e48a..6f12ddb31b 100644
--- a/crawl-ref/source/tilesdl.cc
+++ b/crawl-ref/source/tilesdl.cc
@@ -313,7 +313,11 @@ bool TilesFramework::initialise()
return (false);
}
- if (!m_image.load_textures())
+ // If the window size is less than the view height, the textures will
+ // have to be shrunk. If this isn't the case, then don't create mipmaps,
+ // as this appears to make things blurry on some users machines.
+ bool need_mips = (m_windowsz.y < 32 * VIEW_MIN_HEIGHT);
+ if (!m_image.load_textures(need_mips))
return (false);
calculate_default_options();